summaryrefslogtreecommitdiff
path: root/gobject/gsignal.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-01-18 14:03:16 +0100
committerBenjamin Otte <otte@redhat.com>2010-01-18 14:46:55 +0100
commit914120b9701650ccf7bede1907b69b521ca43236 (patch)
tree6ce7bc1ecd9ca91516c8890ce07a9f3dfd3848e1 /gobject/gsignal.c
parent956b3b507d03b6d10f8bef34b3775a409c5ba9ee (diff)
Ensure values are memset to 0 when calling G_VALUE_COLLECT_INIT()
The reason we need to enforce this is that the GTypeValueTable documentation explicitly states that memory is memset to 0 when the value_init function is called. https://bugzilla.gnome.org/show_bug.cgi?id=603590
Diffstat (limited to 'gobject/gsignal.c')
-rw-r--r--gobject/gsignal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index 9004ee833..c7c16799b 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -1971,7 +1971,7 @@ g_signal_chain_from_overridden_handler (gpointer instance,
va_start (var_args, instance);
signal_return_type = node->return_type;
- instance_and_params = g_slice_alloc (sizeof (GValue) * (n_params + 1));
+ instance_and_params = g_slice_alloc0 (sizeof (GValue) * (n_params + 1));
param_values = instance_and_params + 1;
for (i = 0; i < node->n_params; i++)
@@ -2938,7 +2938,7 @@ g_signal_emit_valist (gpointer instance,
n_params = node->n_params;
signal_return_type = node->return_type;
- instance_and_params = g_slice_alloc (sizeof (GValue) * (n_params + 1));
+ instance_and_params = g_slice_alloc0 (sizeof (GValue) * (n_params + 1));
param_values = instance_and_params + 1;
for (i = 0; i < node->n_params; i++)