[gjs/wip/js24: 7/29] param.cpp fix jump over value initialisation



commit 86882132cb2a0d221f52a6e11700483b9c1b5d9e
Author: Tim Lunn <tim feathertop org>
Date:   Wed Sep 25 08:26:21 2013 +1000

    param.cpp fix jump over value initialisation

 gi/param.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gi/param.cpp b/gi/param.cpp
index 2d01231..38a209b 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -130,7 +130,7 @@ param_get_prop(JSContext            *context,
         goto out;
     }
 
-    if (!gjs_value_from_g_argument(context, value_p, type_info, &arg, TRUE))
+    if (!gjs_value_from_g_argument(context, value_p.address(), type_info, &arg, TRUE))
         goto out;
 
     success = JS_TRUE;
@@ -196,6 +196,7 @@ param_new_internal(JSContext *cx,
     gchar *nick;
     gchar *blurb;
     GParamFlags flags;
+    jsval foo;
 
     if (!gjs_parse_args(cx, "GObject.ParamSpec._new_internal",
                         "!sossi", argc, argv,
@@ -392,7 +393,7 @@ param_new_internal(JSContext *cx,
 
     ret = JS_TRUE;
 
-    jsval foo = OBJECT_TO_JSVAL(gjs_param_from_g_param(cx, pspec));
+    foo = OBJECT_TO_JSVAL(gjs_param_from_g_param(cx, pspec));
 
     JS_SET_RVAL(cx, vp, foo);
  out:


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