[libpeas] Use the correct argument type in the GJS loader



commit 448851135f4f7beb9533fb573aa7641b9316a012
Author: Garrett Regier <alias301 gmail com>
Date:   Sun Jun 12 02:14:27 2011 -0700

    Use the correct argument type in the GJS loader

 loaders/gjs/peas-extension-gjs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/loaders/gjs/peas-extension-gjs.c b/loaders/gjs/peas-extension-gjs.c
index dc67fd4..d37ce32 100644
--- a/loaders/gjs/peas-extension-gjs.c
+++ b/loaders/gjs/peas-extension-gjs.c
@@ -143,21 +143,23 @@ set_out_arg (JSContext      *js_context,
   gboolean nullable;
   GITransfer transfer;
   GIArgument argument;
+  GjsArgumentType arg_type;
 
   if (is_return_value)
     {
+      arg_type = GJS_ARGUMENT_RETURN_VALUE;
       nullable = g_callable_info_may_return_null (func_info);
       transfer = g_callable_info_get_caller_owns (func_info);
     }
   else
     {
+      arg_type = GJS_ARGUMENT_ARGUMENT;
       nullable = g_arg_info_may_be_null (arg_info);
       transfer = g_arg_info_get_ownership_transfer (arg_info);
     }
 
   if (!gjs_value_to_g_argument (js_context, js_value, type_info, NULL,
-                                GJS_ARGUMENT_RETURN_VALUE, /* ? */
-                                transfer, nullable, &argument))
+                                arg_type, transfer, nullable, &argument))
     {
       if (is_return_value)
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]