mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2120 from dumganhar/master
fixed #1811: Fixing complication error on win32 after this pull request (https://github.com/cocos2d/cocos2d-x/pull/2119
This commit is contained in:
commit
f98d4518d0
|
@ -294,6 +294,10 @@ public:
|
|||
operator char*() {
|
||||
return (char*)buffer;
|
||||
}
|
||||
private:
|
||||
/* Copy and assignment are not supported. */
|
||||
JSStringWrapper(const JSStringWrapper &another);
|
||||
JSStringWrapper &operator=(const JSStringWrapper &another);
|
||||
};
|
||||
|
||||
JSBool jsb_set_reserved_slot(JSObject *obj, uint32_t idx, jsval value);
|
||||
|
|
|
@ -80,8 +80,11 @@ JSBool JSBCore_log(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JSString *string = NULL;
|
||||
JS_ConvertArguments(cx, argc, JS_ARGV(cx, vp), "S", &string);
|
||||
if (string) {
|
||||
JSAutoByteString log_str(cx, string);
|
||||
CCLOG(log_str.ptr());
|
||||
char* log_str = JS_EncodeString(cx, string);
|
||||
if (log_str) {
|
||||
CCLOG(log_str);
|
||||
JS_free(cx, (void*)log_str);
|
||||
}
|
||||
}
|
||||
|
||||
return JS_TRUE;
|
||||
|
|
Loading…
Reference in New Issue