Fix for g_signal_emit_valist



Hi Tim,

Here's a small patch to fix a bug in g_signal_emit_valist.

diff -u -r1.21 gsignal.c
--- gobject/gsignal.c	2001/02/17 23:30:48	1.21
+++ gobject/gsignal.c	2001/02/21 22:36:48
@@ -1666,7 +1666,7 @@
 	}
     }
   instance_and_params->g_type = 0;
-  g_value_init (instance_and_params, node->itype);
+  g_value_init (instance_and_params, G_TYPE_FROM_INSTANCE (instance));
   g_value_set_instance (instance_and_params, instance);
   if (node->return_type == G_TYPE_NONE)
     signal_emit_R (node, detail, instance, NULL, instance_and_params);


Previously, when emitting a signal that was part of an interface, it
would try and create a value from node->itype, which refered to the
interface itself (and of course, doesn't have a GTypeValueTable).  By
using the instance's type, we actually get the type.

OK to commit??

Thanks,
-Jonathan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]