mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-26 14:02:17 +01:00
gsignal: Use new g_newa0() function
Replace old `g_alloca()` and `memset()` with `g_newa0()`
This commit is contained in:
committed by
Philip Withnall
parent
8bf62d6309
commit
34cf69ef17
@@ -2266,8 +2266,7 @@ g_signal_chain_from_overridden_handler (gpointer instance,
|
|||||||
va_start (var_args, instance);
|
va_start (var_args, instance);
|
||||||
|
|
||||||
signal_return_type = node->return_type;
|
signal_return_type = node->return_type;
|
||||||
instance_and_params = g_alloca (sizeof (GValue) * (n_params + 1));
|
instance_and_params = g_newa0 (GValue, n_params + 1);
|
||||||
memset (instance_and_params, 0, sizeof (GValue) * (n_params + 1));
|
|
||||||
param_values = instance_and_params + 1;
|
param_values = instance_and_params + 1;
|
||||||
|
|
||||||
for (i = 0; i < node->n_params; i++)
|
for (i = 0; i < node->n_params; i++)
|
||||||
@@ -3462,8 +3461,7 @@ g_signal_emit_valist (gpointer instance,
|
|||||||
|
|
||||||
n_params = node->n_params;
|
n_params = node->n_params;
|
||||||
signal_return_type = node->return_type;
|
signal_return_type = node->return_type;
|
||||||
instance_and_params = g_alloca (sizeof (GValue) * (n_params + 1));
|
instance_and_params = g_newa0 (GValue, n_params + 1);
|
||||||
memset (instance_and_params, 0, sizeof (GValue) * (n_params + 1));
|
|
||||||
param_values = instance_and_params + 1;
|
param_values = instance_and_params + 1;
|
||||||
|
|
||||||
for (i = 0; i < node->n_params; i++)
|
for (i = 0; i < node->n_params; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user