ext/spidermonkey/context.c in jbarnette-johnson-1.0.0.200806240111 vs ext/spidermonkey/context.c in jbarnette-johnson-1.0.0.200807291507

- old
+ new

@@ -46,11 +46,11 @@ JohnsonRuntime* runtime; Data_Get_Struct(self, JohnsonContext, context); Data_Get_Struct(rb_runtime, JohnsonRuntime, runtime); - if ((context->js = JS_NewContext(runtime->js, 8192))) + if ((context->js = JS_NewContext(runtime->js, 8192L))) { // See if the runtime already has a shared global object. JSObject* global = runtime->global; // If it does, use it. If not, @@ -87,19 +87,18 @@ /////////////////////////////////////////////////////////////////////////// //// INFRASTRUCTURE BELOW HERE //////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -static void deallocate(JohnsonContext* context) -{ +static void deallocate(JohnsonContext *context) { JS_SetContextPrivate(context->js, 0); JS_DestroyContext(context->js); free(context); } static VALUE allocate(VALUE klass) { - JohnsonContext* context = calloc(1, sizeof(JohnsonContext)); + JohnsonContext* context = calloc(1L, sizeof(JohnsonContext)); return Data_Wrap_Struct(klass, 0, deallocate, context); } void init_Johnson_SpiderMonkey_Context(VALUE spidermonkey) {