mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 08:16:24 +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
|
||||
n_invoke_args = n_args;
|
||||
atypes = g_new (ffi_type*, n_invoke_args);
|
||||
args = g_new (gpointer, n_invoke_args);
|
||||
atypes = g_alloca (sizeof (ffi_type*) * n_invoke_args);
|
||||
args = g_alloca (sizeof (gpointer) * n_invoke_args);
|
||||
|
||||
if (is_method)
|
||||
{
|
||||
@ -326,10 +326,6 @@ g_function_info_invoke (GIFunctionInfo *info,
|
||||
ffi_call (&cif, func, return_value, args);
|
||||
|
||||
success = TRUE;
|
||||
|
||||
out:
|
||||
g_free (atypes);
|
||||
g_free (args);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user