Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing compiler warnings.

  • Loading branch information...
commit d3286d8d05b5212b11dedfbd764ec18946bfec2c 1 parent 20a9171
@jbarnette authored
Showing with 10 additions and 9 deletions.
  1. +9 −8 ext/spidermonkey/context.c
  2. +1 −1  ext/spidermonkey/js_land_proxy.c
View
17 ext/spidermonkey/context.c
@@ -134,32 +134,33 @@ static VALUE initialize_native(VALUE self, VALUE options)
assert(context->gcthings = JS_NewObject(context->js, NULL, 0, 0));
assert(context->global = JS_NewObject(context->js, &OurGlobalClass, NULL, NULL));
- // assert(JS_InitStandardClasses(context->js, context->global));
assert(JS_AddRoot(context->js, &(context->gcthings)));
-
JS_SetErrorReporter(context->js, error);
JS_SetContextPrivate(context->js, (void *)self);
jsval js_cObject;
assert(JS_GetProperty(context->js, context->global, "Object", &js_cObject));
- JS_DefineFunction(context->js, js_cObject, "defineProperty", define_property, 4, 0);
- JS_DefineProperty(context->js, js_cObject, "READ_ONLY",
+ JS_DefineFunction(context->js, JSVAL_TO_OBJECT(js_cObject), "defineProperty", define_property, 4, 0);
+
+ JS_DefineProperty(context->js, JSVAL_TO_OBJECT(js_cObject), "READ_ONLY",
INT_TO_JSVAL(0x02), NULL, NULL, JSPROP_READONLY);
- JS_DefineProperty(context->js, js_cObject, "ITERABLE",
+
+ JS_DefineProperty(context->js, JSVAL_TO_OBJECT(js_cObject), "ITERABLE",
INT_TO_JSVAL(0x01), NULL, NULL, JSPROP_READONLY);
- JS_DefineProperty(context->js, js_cObject, "NON_DELETABLE",
+
+ JS_DefineProperty(context->js, JSVAL_TO_OBJECT(js_cObject), "NON_DELETABLE",
INT_TO_JSVAL(0x04), NULL, NULL, JSPROP_READONLY);
return self;
}
// Argv is [ object, name, value, READ_ONLY | ITERABLE | NON_DELETABLE ]
-static JSBool define_property(JSContext *context, JSObject *obj, uintN argc, jsval *argv, jsval *retval) {
+static JSBool define_property(JSContext *js_context, JSObject *obj, uintN argc, jsval *argv, jsval *retval) {
char *name = JS_GetStringBytes(JSVAL_TO_STRING(argv[1]));
int flags = JSVAL_TO_INT(argv[3]);
- JS_DefineProperty(context, argv[0], name, argv[2], NULL, NULL, flags);
+ JS_DefineProperty(js_context, JSVAL_TO_OBJECT(argv[0]), name, argv[2], NULL, NULL, flags);
return JS_TRUE;
}
View
2  ext/spidermonkey/js_land_proxy.c
@@ -14,7 +14,7 @@ static JSClass JSLandProxyClass = {
get,
set,
JS_EnumerateStub,
- resolve,
+ (JSResolveOp) resolve,
JS_ConvertStub,
finalize
};
Please sign in to comment.
Something went wrong with that request. Please try again.