Revision: 5050 http://geany.svn.sourceforge.net/geany/?rev=5050&view=rev Author: ntrel Date: 2010-06-18 14:20:10 +0000 (Fri, 18 Jun 2010)
Log Message: ----------- Remove foreach_slist_free() macro - not worth the complexity (list nodes are probably cached anyway).
Modified Paths: -------------- trunk/plugins/filebrowser.c
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2010-06-18 12:22:00 UTC (rev 5049) +++ trunk/plugins/filebrowser.c 2010-06-18 14:20:10 UTC (rev 5050) @@ -257,10 +257,6 @@ }
-/* Reuses list to free each node, so list must be a variable */ -#define foreach_slist_free(node, list) \ - for (node = list, list = NULL; g_slist_free_1(list), node != NULL; list = node, node = node->next) - /* recreate the tree model from current_dir. */ static void refresh(void) { @@ -283,14 +279,15 @@ list = utils_get_file_list(current_dir, NULL, NULL); if (list != NULL) { - /* free filenames & nodes as we go through the list */ - foreach_slist_free(node, list) + /* free filenames as we go through the list */ + foreach_slist(node, list) { gchar *fname = node->data;
add_item(fname); g_free(fname); } + g_slist_free(list); } gtk_entry_completion_set_model(entry_completion, GTK_TREE_MODEL(file_store)); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.