[gjs/wip/ptomato/mozjs31: 17/17] WIP - interface



commit 239a7d75ceeb8833bf160792752063fcb3dd2b82
Author: Philip Chimento <philip endlessm com>
Date:   Wed Nov 2 19:56:01 2016 -0700

    WIP - interface

 gi/interface.cpp |    7 +++----
 gi/value.cpp     |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gi/interface.cpp b/gi/interface.cpp
index c03f635..ee844cb 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -190,7 +190,6 @@ gjs_define_interface_class(JSContext              *context,
     const char *constructor_name;
     const char *ns;
     JS::RootedObject prototype(context);
-    JS::Value value;
 
     ns = gjs_get_names_from_gtype_and_gi_info(gtype, (GIBaseInfo *) info,
                                               &constructor_name);
@@ -226,9 +225,9 @@ gjs_define_interface_class(JSContext              *context,
     if (priv->info)
         gjs_define_static_methods(context, constructor, priv->gtype, priv->info);
 
-    value = JS::ObjectOrNullValue(gjs_gtype_create_gtype_wrapper(context, priv->gtype));
-    JS_DefineProperty(context, constructor, "$gtype", value,
-                      NULL, NULL, JSPROP_PERMANENT);
+    JS::RootedValue value(context,
+        JS::ObjectOrNullValue(gjs_gtype_create_gtype_wrapper(context, priv->gtype)));
+    JS_DefineProperty(context, constructor, "$gtype", value, JSPROP_PERMANENT);
 
     return true;
 }
diff --git a/gi/value.cpp b/gi/value.cpp
index 7c3bc94..d32a6ff 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -120,7 +120,7 @@ closure_marshal(GClosure        *closure,
     JSContext *context;
     JSRuntime *runtime;
     JSObject *obj;
-    int i;
+    unsigned i;
     GSignalQuery signal_query = { 0, };
     GISignalInfo *signal_info;
     bool *skip;


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