diff options
Diffstat (limited to 'sca-cpp/trunk/modules/json')
-rw-r--r-- | sca-cpp/trunk/modules/json/json-test.cpp | 2 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/json/json.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/json/json-test.cpp b/sca-cpp/trunk/modules/json/json-test.cpp index 9bae859ce2..abed71a9c3 100644 --- a/sca-cpp/trunk/modules/json/json-test.cpp +++ b/sca-cpp/trunk/modules/json/json-test.cpp @@ -35,7 +35,7 @@ bool testJSEval() { JSONContext cx; const string script("(function testJSON(n){ return JSON.parse(JSON.stringify(n)) })(5)"); jsval rval; - assert(JS_EvaluateScript(cx, cx.getGlobal(), c_str(script), length(script), "testJSON.js", 1, &rval)); + assert(JS_EvaluateScript(cx, cx.getGlobal(), c_str(script), (uintN)length(script), "testJSON.js", 1, &rval)); const string r(JS_GetStringBytes(JS_ValueToString(cx, rval))); assert(r == "5"); return true; diff --git a/sca-cpp/trunk/modules/json/json.hpp b/sca-cpp/trunk/modules/json/json.hpp index 94d37866a3..a0617b0e5e 100644 --- a/sca-cpp/trunk/modules/json/json.hpp +++ b/sca-cpp/trunk/modules/json/json.hpp @@ -217,7 +217,7 @@ failable<bool> consume(JSONParser* parser, const list<string>& ilist, const JSON if (isNil(ilist)) return true; JSString* jstr = JS_NewStringCopyZ(cx, c_str(car(ilist))); - if(!JS_ConsumeJSONText(cx, parser, JS_GetStringChars(jstr), JS_GetStringLength(jstr))) + if(!JS_ConsumeJSONText(cx, parser, JS_GetStringChars(jstr), (uint32)JS_GetStringLength(jstr))) return mkfailure<bool>("JS_ConsumeJSONText failed"); return consume(parser, cdr(ilist), cx); } |