mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 06:56:16 +01:00
Use g_alloca, suggested by Havoc Pennington
svn path=/trunk/; revision=649
This commit is contained in:
parent
ec679636ef
commit
aceef77051
@ -226,8 +226,8 @@ g_function_info_invoke (GIFunctionInfo *info,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
n_invoke_args = n_args;
|
n_invoke_args = n_args;
|
||||||
atypes = g_new (ffi_type*, n_invoke_args);
|
atypes = g_alloca (sizeof (ffi_type*) * n_invoke_args);
|
||||||
args = g_new (gpointer, n_invoke_args);
|
args = g_alloca (sizeof (gpointer) * n_invoke_args);
|
||||||
|
|
||||||
if (is_method)
|
if (is_method)
|
||||||
{
|
{
|
||||||
@ -326,10 +326,6 @@ g_function_info_invoke (GIFunctionInfo *info,
|
|||||||
ffi_call (&cif, func, return_value, args);
|
ffi_call (&cif, func, return_value, args);
|
||||||
|
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
g_free (atypes);
|
|
||||||
g_free (args);
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user