glib r7979 - trunk/gobject
- From: kristian svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7979 - trunk/gobject
- Date: Fri, 13 Mar 2009 09:22:58 +0000 (UTC)
Author: kristian
Date: Fri Mar 13 09:22:57 2009
New Revision: 7979
URL: http://svn.gnome.org/viewvc/glib?rev=7979&view=rev
Log:
2009-03-13 Kristian Rietveld <kris imendio com>
* gsignal.c (signal_lookup_closure): when defaulting to the only
item in the array, check if this is indeed the default closure.
(patch by Tim Janik).
Modified:
trunk/gobject/ChangeLog
trunk/gobject/gsignal.c
Modified: trunk/gobject/gsignal.c
==============================================================================
--- trunk/gobject/gsignal.c (original)
+++ trunk/gobject/gsignal.c Fri Mar 13 09:22:57 2009
@@ -1448,9 +1448,12 @@
ClassClosure *cc;
if (node->class_closure_bsa && g_bsearch_array_get_n_nodes (node->class_closure_bsa) == 1)
- cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
- else
- cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
+ {
+ cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
+ if (cc && cc->instance_type == 0) /* check for default closure */
+ return cc->closure;
+ }
+ cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
return cc ? cc->closure : NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]