diff --git a/source/scriptinterface/ScriptConversions.cpp b/source/scriptinterface/ScriptConversions.cpp
index fd75a8b497..b1a89c6c1a 100644
a
|
b
|
template<> bool ScriptInterface::FromJSVal<u8>(JSContext* cx, JS::HandleValue v,
|
116 | 116 | return true; |
117 | 117 | } |
118 | 118 | |
119 | | template<> bool ScriptInterface::FromJSVal<long>(JSContext* cx, JS::HandleValue v, long& out) |
| 119 | template<> bool ScriptInterface::FromJSVal<i64>(JSContext* cx, JS::HandleValue v, i64& out) |
120 | 120 | { |
121 | 121 | JSAutoRequest rq(cx); |
122 | 122 | i64 tmp; |
123 | 123 | bool ok = JS::ToInt64(cx, v, &tmp); |
124 | | out = (long)tmp; |
| 124 | out = (i64)tmp; |
125 | 125 | return ok; |
126 | 126 | } |
127 | 127 | |
128 | | template<> bool ScriptInterface::FromJSVal<unsigned long>(JSContext* cx, JS::HandleValue v, unsigned long& out) |
| 128 | template<> bool ScriptInterface::FromJSVal<u64>(JSContext* cx, JS::HandleValue v, u64& out) |
129 | 129 | { |
130 | 130 | JSAutoRequest rq(cx); |
131 | 131 | u64 tmp; |
132 | 132 | bool ok = JS::ToUint64(cx, v, &tmp); |
133 | | out = (unsigned long)tmp; |
| 133 | out = (u64)tmp; |
134 | 134 | return ok; |
135 | 135 | } |
136 | 136 | |
… |
… |
template<> void ScriptInterface::ToJSVal<u32>(JSContext* UNUSED(cx), JS::Mutable
|
294 | 294 | ret.set(JS::NumberValue(val)); |
295 | 295 | } |
296 | 296 | |
297 | | template<> void ScriptInterface::ToJSVal<long>(JSContext* UNUSED(cx), JS::MutableHandleValue ret, const long& val) |
| 297 | template<> void ScriptInterface::ToJSVal<i64>(JSContext* UNUSED(cx), JS::MutableHandleValue ret, const i64& val) |
298 | 298 | { |
299 | 299 | ret.set(JS::NumberValue((int)val)); |
300 | 300 | } |
301 | 301 | |
302 | | template<> void ScriptInterface::ToJSVal<unsigned long>(JSContext* UNUSED(cx), JS::MutableHandleValue ret, const unsigned long& val) |
| 302 | template<> void ScriptInterface::ToJSVal<u64>(JSContext* UNUSED(cx), JS::MutableHandleValue ret, const u64& val) |
303 | 303 | { |
304 | 304 | ret.set(JS::NumberValue((int)val)); |
305 | 305 | } |