# HG changeset patch # User Myhailo Danylenko # Date 1344186632 -10800 # Node ID 6b753fbacd4ce8bdea7a6017d03bfb986f3fe5e6 # Parent 9a803cc7524501b726dff096fe1b999f5b926870 Do not use g_slist_free_full (for now) diff -r 9a803cc75245 -r 6b753fbacd4c lua.c --- a/lua.c Sun Jul 22 15:35:57 2012 +0300 +++ b/lua.c Sun Aug 05 20:10:32 2012 +0300 @@ -1759,7 +1759,7 @@ } } -static void lua_events_destroy ( gpointer data ) +static void lua_events_destroy ( gpointer data, gpointer udata ) { lua_event_callback_t *cb = data; const char *evid; @@ -1768,27 +1768,27 @@ lua_rawgeti (cb->L, LUA_REGISTRYINDEX, cb->evid); evid = lua_tostring (cb ->L, -1); evs_callback (evid, EVS_CONTEXT_CANCEL, "Module unloading"); - evs_del (evid); // XXX before these were two different runs. is there some reason for that? + evs_del (evid); } -static void lua_bgreads_destroy ( gpointer data ) +static void lua_bgreads_destroy ( gpointer data, gpointer udata ) { g_source_remove ( ( gulong ) data ); } -static void lua_timers_destroy ( gpointer data ) +static void lua_timers_destroy ( gpointer data, gpointer udata ) { g_source_remove ( ( gulong ) data ); } -static void lua_features_destroy ( gpointer data ) +static void lua_features_destroy ( gpointer data, gpointer udata ) { gchar *xmlns = data; xmpp_del_feature (xmlns); g_free (xmlns); } -static void lua_categories_destroy ( gpointer data ) +static void lua_categories_destroy ( gpointer data, gpointer udata ) { compl_del_category ( ( gulong ) data ); } @@ -1805,13 +1805,16 @@ lua_guard_uninit ( lua ); - g_slist_free_full ( lua_bgreads, lua_bgreads_destroy ); + g_slist_foreach ( lua_bgreads, lua_bgreads_destroy, NULL ); + g_slist_free ( lua_bgreads ); lua_bgreads = NULL; - g_slist_free_full ( lua_timers, lua_timers_destroy ); + g_slist_foreach ( lua_timers, lua_timers_destroy, NULL ); + g_slist_free ( lua_timers ); lua_timers = NULL; - g_slist_free_full ( lua_events, lua_events_destroy ); + g_slist_foreach ( lua_events, lua_events_destroy, NULL ); + g_slist_free ( lua_events ); lua_events = NULL; #ifdef MCABBER_API_HAVE_CMD_ID @@ -1824,10 +1827,12 @@ lua_close (lua); lua = NULL; - g_slist_free_full ( lua_added_features, lua_features_destroy ); + g_slist_foreach ( lua_added_features, lua_features_destroy, NULL ); + g_slist_free ( lua_added_features ); lua_added_features = NULL; - g_slist_free_full ( lua_added_categories, lua_categories_destroy ); + g_slist_foreach ( lua_added_categories, lua_categories_destroy, NULL ); + g_slist_free ( lua_added_categories ); lua_added_categories = NULL; #ifdef LLM_LOG_HANDLER