[libpeas] Use stack-allocation in Seed loader
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Use stack-allocation in Seed loader
- Date: Thu, 24 Mar 2011 23:06:41 +0000 (UTC)
commit e1ed351ebe325fe24dc378bc3c4e1ed6ea898822
Author: Garrett Regier <alias301 gmail com>
Date: Mon Mar 21 06:48:40 2011 -0700
Use stack-allocation in Seed loader
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]