After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 560857 - GNOME Goal: Remove deprecated GLib symbols
GNOME Goal: Remove deprecated GLib symbols
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: unknown
SVN TRUNK
Other Linux
: Normal minor
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks: 560423
 
 
Reported: 2008-11-14 21:49 UTC by Luis Menina
Modified: 2009-02-05 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build_basic (2.03 KB, patch)
2008-11-21 15:24 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
valgrind (1.82 KB, patch)
2008-11-21 15:30 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
search (2.56 KB, patch)
2008-11-21 15:50 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review
search v2 (2.59 KB, patch)
2008-11-21 16:04 UTC, Ignacio Casal Quinteiro (nacho)
needs-work Details | Review
search v3 (2.10 KB, patch)
2008-11-24 18:08 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review

Description Luis Menina 2008-11-14 21:49:25 UTC
See http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/Glib
Here are the files+lines using deprecated GLib symbols in this module:

anjuta/tagmanager/tm_tag.c:20:static GMemChunk *s_tag_mem_chunk = NULL;
anjuta/tagmanager/tm_tag.c:24:		s_tag_mem_chunk = g_mem_chunk_new("TMTag memChunk", sizeof(TMTag), 10000 \
anjuta/tagmanager/tm_tag.c:25:		  , G_ALLOC_AND_FREE); \
anjuta/tagmanager/tm_tag.c:26:	(T) = g_chunk_new0(TMTag, s_tag_mem_chunk);}
anjuta/tagmanager/tm_tag.c:28:#define TAG_FREE(T) g_mem_chunk_free(s_tag_mem_chunk, (T))
anjuta/tagmanager/tm_tag.c:731:		g_mem_chunk_clean (s_tag_mem_chunk);
anjuta/tagmanager/tm_file_entry.c:25:static GMemChunk *file_mem_chunk = NULL;
anjuta/tagmanager/tm_file_entry.c:29:		file_mem_chunk = g_mem_chunk_new("TMFileEntry MemChunk", sizeof(TMFileEntry), 1024 \
anjuta/tagmanager/tm_file_entry.c:30:		  , G_ALLOC_AND_FREE); \
anjuta/tagmanager/tm_file_entry.c:31:	(T) = g_chunk_new0(TMFileEntry, file_mem_chunk);}
anjuta/tagmanager/tm_file_entry.c:33:#define FILE_FREE(T) g_mem_chunk_free(file_mem_chunk, (T))
anjuta/tagmanager/tm_symbol.c:16:static GMemChunk *sym_mem_chunk = NULL;
anjuta/tagmanager/tm_symbol.c:20:		sym_mem_chunk = g_mem_chunk_new("TMSymbol MemChunk", sizeof(TMSymbol), 1024 \
anjuta/tagmanager/tm_symbol.c:21:		  , G_ALLOC_AND_FREE); \
anjuta/tagmanager/tm_symbol.c:22:	(T) = g_chunk_new0(TMSymbol, sym_mem_chunk);}
anjuta/tagmanager/tm_symbol.c:24:#define SYM_FREE(T) g_mem_chunk_free(sym_mem_chunk, (T))
anjuta/plugins/tools/tool.h:96:	GMemChunk* data_pool;
anjuta/plugins/tools/tool.c:386:					tool = g_chunk_new0(ATPUserTool, list->data_pool);
anjuta/plugins/tools/tool.c:396:					first = g_chunk_new(ATPUserTool, list->data_pool);
anjuta/plugins/tools/tool.c:409:			tool = g_chunk_new0(ATPUserTool, list->data_pool);
anjuta/plugins/tools/tool.c:418:		tool = g_chunk_new0(ATPUserTool, list->data_pool);
anjuta/plugins/tools/tool.c:437:	g_chunk_free (this, this->owner->data_pool);
anjuta/plugins/tools/tool.c:804:	this->data_pool = g_mem_chunk_new ("tool pool", sizeof (ATPUserTool), STRING_CHUNK_SIZE * sizeof (ATPUserTool) / 4, G_ALLOC_AND_FREE);
anjuta/plugins/tools/tool.c:813:	g_mem_chunk_destroy (this->data_pool);
anjuta/plugins/document-manager/anjuta-docman.c:1547:	return (g_strcasecmp (aos.m_label, bos.m_label)); /* need g_utf8_collate() ? */
anjuta/plugins/patch/patch-plugin.c:179:		g_string_sprintf (command, "patch --dry-run -d %s -p %d -f -i %s",
anjuta/plugins/patch/patch-plugin.c:182:		g_string_sprintf (command, "patch -d %s -p %d -f -i %s",
anjuta/plugins/project-manager/plugin.c:1240:	anjuta_status_push (status, _("Loading project: %s"), g_basename (dirname));
anjuta/plugins/project-manager/plugin.c:1281:	anjuta_status_set_default (status, _("Project"), g_basename (dirname));
anjuta/plugins/search/search_preferences.c:321:		if (g_strcasecmp(name, BASIC))
anjuta/plugins/search/search_preferences.c:425:	if (g_strcasecmp(name, BASIC))
anjuta/plugins/search/search_preferences.c:456:		if (g_strcasecmp(name, BASIC))
anjuta/plugins/search/search_preferences.c:469:			if (!g_strcasecmp(name, path))
anjuta/plugins/search/search_preferences.c:499:		if (g_strcasecmp(name, BASIC))
anjuta/plugins/search/search_preferences.c:574:	if (default_pref && g_strcasecmp(default_pref, "")  && g_strcasecmp(default_pref, BASIC))	
anjuta/plugins/gtodo/libgtodo.c:66:	g_date_set_time(item->start, (GTime)item->id);
anjuta/plugins/gtodo/libgtodo.c:227:	g_date_set_time(today, time(NULL));
anjuta/plugins/gtodo/libgtodo.c:256:		g_date_set_time(date, item->last_edited);
anjuta/plugins/gtodo/libgtodo.c:354:	g_date_set_time(item->stop, time(NULL));
anjuta/plugins/gtodo/todo_db.c:253:	g_date_set_time (date, time (NULL));
anjuta/plugins/gtodo/egg-datetime.c:935:	g_date_set_time (now, time (NULL));
anjuta/plugins/gtodo/add_edit_item.c:423:		g_date_set_time(date, time(NULL));
anjuta/plugins/file-loader/plugin.c:108:							  g_basename (uri), errmsg);
anjuta/plugins/file-loader/plugin.c:186:							   g_basename(uri), mime_type);
anjuta/plugins/project-wizard/property.c:52:	GMemChunk* data_pool;
anjuta/plugins/project-wizard/property.c:53:	GMemChunk* item_pool;
anjuta/plugins/project-wizard/property.c:139:	this = g_chunk_new0(NPWProperty, owner->data_pool);
anjuta/plugins/project-wizard/property.c:581:	item  = g_chunk_new (NPWItem, this->owner->item_pool);
anjuta/plugins/project-wizard/property.c:670:	this->data_pool = g_mem_chunk_new ("property pool", sizeof (NPWProperty), STRING_CHUNK_SIZE * sizeof (NPWProperty) / 4, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/property.c:671:	this->item_pool = g_mem_chunk_new ("item pool", sizeof (NPWItem), STRING_CHUNK_SIZE * sizeof (NPWItem) / 4, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/property.c:684:	g_mem_chunk_destroy (this->data_pool);
anjuta/plugins/project-wizard/property.c:685:	g_mem_chunk_destroy (this->item_pool);
anjuta/plugins/project-wizard/druid.c:96:	GMemChunk* pool;
anjuta/plugins/project-wizard/druid.c:269:	data = g_chunk_new (NPWDruidAndTextBuffer, this->pool);
anjuta/plugins/project-wizard/druid.c:952:	this->pool = g_mem_chunk_new ("druid pool", sizeof(NPWDruidStuff), sizeof(NPWDruidStuff) * 20, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/druid.c:1021:	g_mem_chunk_destroy(this->pool);
anjuta/plugins/project-wizard/parser.c:1031:	GMemChunk* tag_pool;
anjuta/plugins/project-wizard/parser.c:1339:		new_child = g_chunk_new (NPWFileTag, parser->tag_pool);
anjuta/plugins/project-wizard/parser.c:1365:		g_mem_chunk_free (parser->tag_pool, g_queue_pop_head (parser->tag));
anjuta/plugins/project-wizard/parser.c:1398:	this->tag_pool = g_mem_chunk_new ("file tag pool", sizeof (NPWFileTag), NPW_FILE_PARSER_DEFAULT_LEVEL  * sizeof (NPWFileTag) , G_ALLOC_AND_FREE);
anjuta/plugins/project-wizard/parser.c:1422:	g_mem_chunk_destroy (this->tag_pool);
anjuta/plugins/project-wizard/action.c:46:	GMemChunk* data_pool;
anjuta/plugins/project-wizard/action.c:69:	this = g_chunk_new0(NPWAction, owner->data_pool);
anjuta/plugins/project-wizard/action.c:133:	this->data_pool = g_mem_chunk_new ("action pool", sizeof (NPWAction), STRING_CHUNK_SIZE * sizeof (NPWAction) / 4, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/action.c:145:	g_mem_chunk_destroy (this->data_pool);
anjuta/plugins/project-wizard/values.c:53:	GMemChunk* value_pool;	
anjuta/plugins/project-wizard/values.c:73:	this->value_pool = g_mem_chunk_new ("value pool", sizeof(NPWValue), (STRING_CHUNK_SIZE / 4) * sizeof(NPWValue), G_ALLOC_ONLY);
anjuta/plugins/project-wizard/values.c:83:	g_mem_chunk_destroy (this->value_pool);
anjuta/plugins/project-wizard/values.c:121:		node = g_chunk_new (NPWValue, this->value_pool);
anjuta/plugins/project-wizard/file.c:42:	GMemChunk* data_pool;
anjuta/plugins/project-wizard/file.c:71:	this = g_chunk_new0(NPWFile, owner->data_pool);
anjuta/plugins/project-wizard/file.c:208:	this->data_pool = g_mem_chunk_new ("file pool", sizeof (NPWFile), STRING_CHUNK_SIZE * sizeof (NPWFile) / 4, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/file.c:220:	g_mem_chunk_destroy (this->data_pool);
anjuta/plugins/project-wizard/header.c:45:	GMemChunk* data_pool;
anjuta/plugins/project-wizard/header.c:70:	this = g_chunk_new0(NPWHeader, owner->data_pool);
anjuta/plugins/project-wizard/header.c:318:	this->data_pool = g_mem_chunk_new ("project pool", sizeof (NPWHeader), STRING_CHUNK_SIZE * sizeof (NPWHeader) / 4, G_ALLOC_ONLY);
anjuta/plugins/project-wizard/header.c:330:	g_mem_chunk_destroy (this->data_pool);
anjuta/plugins/valgrind/vgactions.c:302:		g_io_channel_close (priv->gio);
anjuta/plugins/valgrind/vgrule-list.c:461:		g_io_channel_close (list->gio);
anjuta/plugins/valgrind/vgrule-list.c:508:	g_io_channel_close (list->gio);
anjuta/plugins/valgrind/vgrule-list.c:573:			g_io_channel_close (list->gio);
anjuta/plugins/build-basic-autotools/plugin.c:1779:		gchar *dirname = g_dirname (plugin->current_editor_filename);
anjuta/plugins/build-basic-autotools/plugin.c:1792:		gchar *dirname = g_dirname (plugin->current_editor_filename);
anjuta/plugins/build-basic-autotools/plugin.c:1805:		gchar *dirname = g_dirname (plugin->current_editor_filename);
anjuta/plugins/build-basic-autotools/plugin.c:2245:		dirname = g_dirname (bb_plugin->current_editor_filename);
anjuta/plugins/build-basic-autotools/plugin.c:2248:		module = escape_label (g_basename (dirname));
anjuta/plugins/build-basic-autotools/plugin.c:2249:		filename = escape_label (g_basename (bb_plugin->current_editor_filename));
Comment 1 Ignacio Casal Quinteiro (nacho) 2008-11-21 15:24:48 UTC
Created attachment 123176 [details] [review]
build_basic

First patch.
Comment 2 Ignacio Casal Quinteiro (nacho) 2008-11-21 15:30:38 UTC
Created attachment 123179 [details] [review]
valgrind

Second patch.
Comment 3 Ignacio Casal Quinteiro (nacho) 2008-11-21 15:50:45 UTC
Created attachment 123181 [details] [review]
search

Third patch
Comment 4 Ignacio Casal Quinteiro (nacho) 2008-11-21 16:04:58 UTC
Created attachment 123182 [details] [review]
search v2

Now should be ok.
Comment 5 Sébastien Granjoux 2008-11-24 17:57:08 UTC
(In reply to comment #4)
> Created an attachment (id=123182) [edit]
> search v2
> Now should be ok.

Why do you use g_ascii_strncasecmp while g_ascii_strcasecmp exists ?
Then, there is one use of g_strcmp0 which seems strange to me.


Comment 6 Ignacio Casal Quinteiro (nacho) 2008-11-24 18:08:44 UTC
Created attachment 123330 [details] [review]
search v3

You're right, I don't know why I used that func. Now it is fixed. I think the g_strcmp0 logic is ok, I just changed g_strcasecmp to a g_strcmp0 because the compared value is "".
Comment 7 Sébastien Granjoux 2008-11-24 18:11:18 UTC
You are really fast...
 
I have committed your 2 first patches. There is an error in the second one
though, because g_io_channel_shutdown has 3 arguments instead of one for
g_io_channel_close.
Comment 8 Ignacio Casal Quinteiro (nacho) 2008-11-24 18:16:09 UTC
(In reply to comment #7)
> You are really fast...
> 
> I have committed your 2 first patches. There is an error in the second one
> though, because g_io_channel_shutdown has 3 arguments instead of one for
> g_io_channel_close.
> 
Sorry, as I do not have enabled the valgrind plugin I didn't test it.
Comment 9 Sébastien Granjoux 2008-11-24 18:27:04 UTC
Ok, I have committed your third patch with a small fix. Thanks for your patches.
Comment 10 Sébastien Granjoux 2008-12-11 21:48:18 UTC
I have removed the use of g_mem_chunk in the tools plugin.
Comment 11 Sébastien Granjoux 2008-12-21 08:38:06 UTC
I'm currently working on the project wizard...
Comment 12 Sébastien Granjoux 2009-01-31 16:36:51 UTC
I have searched the whole tree for remaining deprecated symbols, found and fixed a few of them. I have just committed the changes.

I think this bug could be closed but I'm using a quite old version of Glib: 2.16.

Is there someone, with a more recent version of Glib, that could check that all deprecated symbols have been removed ?
Comment 13 Ignacio Casal Quinteiro (nacho) 2009-01-31 16:55:10 UTC
ii  libglib2.0-0                               2.19.5-0ubuntu3                   The GLib library of C routines

It builds perfect with: make CFLAGS+="-DG_DISABLE_DEPRECATED"

I suppose it will not compile if you have that option enabled, I didn't have a look at the warnings. So if it gives errors instead of warnings there are no more deprecated funcs.
Comment 14 Sébastien Granjoux 2009-01-31 17:23:55 UTC
(In reply to comment #13)
> ii  libglib2.0-0                               2.19.5-0ubuntu3                 
>  The GLib library of C routines
> 
> It builds perfect with: make CFLAGS+="-DG_DISABLE_DEPRECATED"
> 
> I suppose it will not compile if you have that option enabled, I didn't have a
> look at the warnings. So if it gives errors instead of warnings there are no
> more deprecated funcs.

I think you can always build but you will get errors when loading the plugin in Anjuta. Could you check that you can load all plugins ?

Comment 15 Ignacio Casal Quinteiro (nacho) 2009-01-31 17:35:48 UTC
It seems I cannot run anjuta now, I am getting a crash in the symbol-db plugin. Sorry.
Comment 16 Sébastien Granjoux 2009-01-31 20:28:13 UTC
Is it due to my patch ?

I haven't changed anything in symbol-db but we could have strange effect sometimes.
Comment 17 Ignacio Casal Quinteiro (nacho) 2009-02-01 09:55:41 UTC
Sorry, it is not a bug in symbol-db, the bug report is:
http://bugzilla.gnome.org/show_bug.cgi?id=569999

Seems a bug when loading the project. But maybe it is a bug in my unstable glib or something. Can you check it?
Comment 18 Johannes Schmid 2009-02-05 08:44:40 UTC
Do you still have the problem at start-up?
Comment 19 Ignacio Casal Quinteiro (nacho) 2009-02-05 09:24:10 UTC
The bug I meant was this: #560857.

Anyway I would close this as fixed.