summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-12-02 16:40:16 +0100
committerEdward Hervey <bilboed@bilboed.com>2009-12-29 13:13:23 +0100
commit1f04f0f0527b005103e16dfcde813622a6f0694f (patch)
tree52f84581e0a83e2c5124e95a54a40e191066ae47
parent512580d1ef7f6e32fd81fae3c6972ad3b7ea31eb (diff)
gsignal: Use new g_value_make_instance method
Speeds up g_signal_emit_valist by another 15%
-rw-r--r--gobject/gsignal.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index c7c16799b..b63ef4721 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -2004,9 +2004,7 @@ g_signal_chain_from_overridden_handler (gpointer instance,
}
SIGNAL_UNLOCK ();
- instance_and_params->g_type = 0;
- g_value_init (instance_and_params, G_TYPE_FROM_INSTANCE (instance));
- g_value_set_instance (instance_and_params, instance);
+ _g_value_make_instance (instance_and_params, instance);
SIGNAL_LOCK ();
emission->chain_type = chain_type;
@@ -2969,9 +2967,7 @@ g_signal_emit_valist (gpointer instance,
SIGNAL_LOCK ();
}
SIGNAL_UNLOCK ();
- instance_and_params->g_type = 0;
- g_value_init (instance_and_params, G_TYPE_FROM_INSTANCE (instance));
- g_value_set_instance (instance_and_params, instance);
+ _g_value_make_instance (instance_and_params, instance);
if (signal_return_type == G_TYPE_NONE)
signal_emit_unlocked_R (node, detail, instance, NULL, instance_and_params);
else