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