|
|
@@ -85,8 +85,8 @@ Script::Script(Context* context) :
|
|
|
scriptEngine_->SetEngineProperty(asEP_ALLOW_UNSAFE_REFERENCES, (asPWORD)true);
|
|
|
scriptEngine_->SetEngineProperty(asEP_ALLOW_IMPLICIT_HANDLE_TYPES, (asPWORD)true);
|
|
|
scriptEngine_->SetEngineProperty(asEP_BUILD_WITHOUT_LINE_CUES, (asPWORD)true);
|
|
|
-//use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
-#if defined(EMSCRIPTEN) || defined(FORCE_AS_PORTABLE)
|
|
|
+// Use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
+#if defined(__EMSCRIPTEN__) || defined(FORCE_AS_PORTABLE)
|
|
|
scriptEngine_->SetMessageCallback(_asMETHOD(Script, MessageCallback), this, asCALL_THISCALL);
|
|
|
#else
|
|
|
scriptEngine_->SetMessageCallback(asMETHOD(Script, MessageCallback), this, asCALL_THISCALL);
|
|
|
@@ -94,8 +94,8 @@ Script::Script(Context* context) :
|
|
|
|
|
|
// Create the context for immediate execution
|
|
|
immediateContext_ = scriptEngine_->CreateContext();
|
|
|
-//use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
-#if defined(EMSCRIPTEN) || defined(FORCE_AS_PORTABLE)
|
|
|
+// Use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
+#if defined(__EMSCRIPTEN__) || defined(FORCE_AS_PORTABLE)
|
|
|
immediateContext_->SetExceptionCallback(_asMETHOD(Script, ExceptionCallback), this, asCALL_THISCALL);
|
|
|
#else
|
|
|
immediateContext_->SetExceptionCallback(asMETHOD(Script, ExceptionCallback), this, asCALL_THISCALL);
|
|
|
@@ -313,8 +313,8 @@ asIScriptContext* Script::GetScriptFileContext()
|
|
|
while (scriptNestingLevel_ >= scriptFileContexts_.Size())
|
|
|
{
|
|
|
asIScriptContext* newContext = scriptEngine_->CreateContext();
|
|
|
-//use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
-#if defined(EMSCRIPTEN) || defined(FORCE_AS_PORTABLE)
|
|
|
+// Use the copy of the original asMETHOD macro in a web build (for some reason it still works, presumably because the signature of the function is known)
|
|
|
+#if defined(__EMSCRIPTEN__) || defined(FORCE_AS_PORTABLE)
|
|
|
newContext->SetExceptionCallback(_asMETHOD(Script, ExceptionCallback), this, asCALL_THISCALL);
|
|
|
#else
|
|
|
newContext->SetExceptionCallback(asMETHOD(Script, ExceptionCallback), this, asCALL_THISCALL);
|