gobject-introspection r649 - trunk/girepository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r649 - trunk/girepository
- Date: Thu, 2 Oct 2008 21:24:24 +0000 (UTC)
Author: walters
Date: Thu Oct 2 21:24:24 2008
New Revision: 649
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=649&view=rev
Log:
Use g_alloca, suggested by Havoc Pennington
Modified:
trunk/girepository/ginvoke.c
Modified: trunk/girepository/ginvoke.c
==============================================================================
--- trunk/girepository/ginvoke.c (original)
+++ trunk/girepository/ginvoke.c Thu Oct 2 21:24:24 2008
@@ -226,8 +226,8 @@
}
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 @@
ffi_call (&cif, func, return_value, args);
success = TRUE;
-
out:
- g_free (atypes);
- g_free (args);
-
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]