From: Kouhei S. <nu...@co...> - 2017-10-29 14:29:29
|
Kouhei Sutou 2017-10-29 23:28:52 +0900 (Sun, 29 Oct 2017) New Revision: 81e143468bf0c799db8bfa1ae1f1dbf9af1df0e1 https://github.com/ruby-gnome2/ruby-gnome2/commit/81e143468bf0c799db8bfa1ae1f1dbf9af1df0e1 Message: glib2: try simplifying Modified files: glib2/ext/glib2/rbglib_source.c Modified: glib2/ext/glib2/rbglib_source.c (+1 -12) =================================================================== --- glib2/ext/glib2/rbglib_source.c 2017-10-29 23:18:57 +0900 (e4540cf78) +++ glib2/ext/glib2/rbglib_source.c 2017-10-29 23:28:52 +0900 (8e5fbf4b7) @@ -25,17 +25,6 @@ static ID id_call; /*****************************************/ #if !GLIB_CHECK_VERSION(2,30,0) -static void -source_free(GSource *source) -{ - if (g_source_is_destroyed(source)) { - return; - } - - g_source_unref(source); - g_source_destroy(source); -} - GType g_source_get_type(void) { @@ -43,7 +32,7 @@ g_source_get_type(void) if (our_type == 0) our_type = g_boxed_type_register_static ("GSource", (GBoxedCopyFunc)g_source_ref, - (GBoxedFreeFunc)source_free); + (GBoxedFreeFunc)g_source_unref); return our_type; } #endif |