Changeset View
Changeset View
Standalone View
Standalone View
source/scriptinterface/ScriptConversions.cpp
Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | |||||
{ \ | { \ | ||||
ToJSVal(cx, ret, static_cast<const wchar_t*>(val)); \ | ToJSVal(cx, ret, static_cast<const wchar_t*>(val)); \ | ||||
} \ | } \ | ||||
template<> void ScriptInterface::ToJSVal<char[N]>(JSContext* cx, JS::MutableHandleValue ret, const char (&val)[N]) \ | template<> void ScriptInterface::ToJSVal<char[N]>(JSContext* cx, JS::MutableHandleValue ret, const char (&val)[N]) \ | ||||
{ \ | { \ | ||||
ToJSVal(cx, ret, static_cast<const char*>(val)); \ | ToJSVal(cx, ret, static_cast<const char*>(val)); \ | ||||
} | } | ||||
TOJSVAL_CHAR() | |||||
TOJSVAL_CHAR(5) | TOJSVAL_CHAR(5) | ||||
TOJSVAL_CHAR(6) | TOJSVAL_CHAR(6) | ||||
TOJSVAL_CHAR(7) | TOJSVAL_CHAR(7) | ||||
TOJSVAL_CHAR(8) | TOJSVAL_CHAR(8) | ||||
TOJSVAL_CHAR(9) | TOJSVAL_CHAR(9) | ||||
TOJSVAL_CHAR(10) | TOJSVAL_CHAR(10) | ||||
TOJSVAL_CHAR(11) | TOJSVAL_CHAR(11) | ||||
TOJSVAL_CHAR(12) | TOJSVAL_CHAR(12) | ||||
TOJSVAL_CHAR(13) | TOJSVAL_CHAR(13) | ||||
TOJSVAL_CHAR(14) | TOJSVAL_CHAR(14) | ||||
TOJSVAL_CHAR(15) | TOJSVAL_CHAR(15) | ||||
TOJSVAL_CHAR(16) | TOJSVAL_CHAR(16) | ||||
TOJSVAL_CHAR(17) | TOJSVAL_CHAR(17) | ||||
TOJSVAL_CHAR(18) | TOJSVAL_CHAR(18) | ||||
TOJSVAL_CHAR(19) | TOJSVAL_CHAR(19) | ||||
TOJSVAL_CHAR(20) | TOJSVAL_CHAR(20) | ||||
TOJSVAL_CHAR(24) | |||||
TOJSVAL_CHAR(29) | TOJSVAL_CHAR(29) | ||||
TOJSVAL_CHAR(33) | TOJSVAL_CHAR(33) | ||||
TOJSVAL_CHAR(35) | TOJSVAL_CHAR(35) | ||||
TOJSVAL_CHAR(256) | |||||
#undef TOJSVAL_CHAR | #undef TOJSVAL_CHAR | ||||
template<> void ScriptInterface::ToJSVal<CStrW>(JSContext* cx, JS::MutableHandleValue ret, const CStrW& val) | template<> void ScriptInterface::ToJSVal<CStrW>(JSContext* cx, JS::MutableHandleValue ret, const CStrW& val) | ||||
{ | { | ||||
ToJSVal(cx, ret, static_cast<const std::wstring&>(val)); | ToJSVal(cx, ret, static_cast<const std::wstring&>(val)); | ||||
} | } | ||||
template<> void ScriptInterface::ToJSVal<CStr8>(JSContext* cx, JS::MutableHandleValue ret, const CStr8& val) | template<> void ScriptInterface::ToJSVal<CStr8>(JSContext* cx, JS::MutableHandleValue ret, const CStr8& val) | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator