diff options
author | Garrett Regier <alias301@gmail.com> | 2011-03-21 06:48:40 -0700 |
---|---|---|
committer | Steve Frécinaux <code@istique.net> | 2011-03-25 00:05:37 +0100 |
commit | e1ed351ebe325fe24dc378bc3c4e1ed6ea898822 (patch) | |
tree | 3334929696d96612658c32694b035aa7813d4554 | |
parent | 9c57921ec56858442c89d12e9ec254830407900b (diff) | |
download | libpeas-e1ed351ebe325fe24dc378bc3c4e1ed6ea898822.tar.gz |
Use stack-allocation in Seed loader
-rw-r--r-- | loaders/seed/peas-extension-seed.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/loaders/seed/peas-extension-seed.c b/loaders/seed/peas-extension-seed.c index 8a946ed..0a9bea0 100644 --- a/loaders/seed/peas-extension-seed.c +++ b/loaders/seed/peas-extension-seed.c @@ -340,8 +340,8 @@ peas_extension_seed_call (PeasExtension *exten, n_args = g_callable_info_get_n_args (func_info); g_return_val_if_fail (n_args >= 0, FALSE); - js_in_args = g_new0 (SeedValue, n_args); - out_args = g_new0 (OutArg, n_args + 1); + js_in_args = g_newa (SeedValue, n_args); + out_args = g_newa (OutArg, n_args + 1); /* We put the return value first in the out tuple, as it seems to be * the common behaviour for GI-based bindings */ @@ -400,8 +400,6 @@ peas_extension_seed_call (PeasExtension *exten, cleanup: - g_free (out_args); - g_free (js_in_args); g_base_info_unref ((GIBaseInfo *) func_info); if (exc == NULL) |