From 3eb7d62e6e5796aaa99532fa17ca28e8d7d175db Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 6 Apr 2016 10:26:46 -0700 Subject: [PATCH] fix: compile in Windows Github issue #15372 --- cocos/scripting/js-bindings/manual/ScriptingCore.cpp | 6 +++--- cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp index 6c63d1c91c..33d7d12f1a 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp @@ -216,7 +216,7 @@ void removeJSObject(JSContext* cx, cocos2d::Ref* nativeObj) auto proxy = jsb_get_native_proxy(nativeObj); if (proxy) { -#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS +#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS JS::RemoveObjectRoot(cx, &proxy->obj); #endif // remove the proxy here, since this was a "stack" object, not heap @@ -2192,7 +2192,7 @@ JSObject* jsb_create_weak_jsobject(JSContext *cx, void *native, js_type_class_t JS::RootedObject jsObj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); auto proxy = jsb_new_proxy(native, jsObj); -#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS +#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS JS::AddNamedObjectRoot(cx, &proxy->obj, debug); #else #if COCOS2D_DEBUG > 1 @@ -2262,7 +2262,7 @@ JSObject* jsb_get_or_create_weak_jsobject(JSContext *cx, void *native, js_type_c JS::RootedObject jsObj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); proxy = jsb_new_proxy(native, jsObj); -#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS +#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS JS::AddNamedObjectRoot(cx, &proxy->obj, debug); #else #if COCOS2D_DEBUG > 1 diff --git a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp index b2db0bc3ae..fdc1c0777a 100644 --- a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp +++ b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp @@ -2215,7 +2215,7 @@ bool js_forceGC(JSContext *cx, uint32_t argc, jsval *vp) { bool js_cocos2dx_retain(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); -#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS +#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Ref* cobj = (cocos2d::Ref *)(proxy ? proxy->ptr : NULL); @@ -2230,7 +2230,7 @@ bool js_cocos2dx_retain(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_release(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); -#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS +#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Ref* cobj = (cocos2d::Ref *)(proxy ? proxy->ptr : NULL);