Update to Angelscript 2.35.1

This commit is contained in:
2022-04-02 15:12:50 +02:00
parent badd37a7d3
commit 6734aa44ec
33 changed files with 650 additions and 316 deletions

View File

@@ -5,6 +5,7 @@
#include <fstream>
#include <set>
#include <stdlib.h>
#include "../autowrapper/aswrappedcall.h"
using namespace std;
@@ -980,9 +981,16 @@ void RegisterExceptionRoutines(asIScriptEngine *engine)
// The string type must be available
assert(engine->GetTypeInfoByDecl("string"));
r = engine->RegisterGlobalFunction("void throw(const string &in)", asFUNCTION(ScriptThrow), asCALL_CDECL); assert(r >= 0);
r = engine->RegisterGlobalFunction("string getExceptionInfo()", asFUNCTION(ScriptGetExceptionInfo), asCALL_CDECL); assert(r >= 0);
(void)r;
if (strstr(asGetLibraryOptions(), "AS_MAX_PORTABILITY") == 0)
{
r = engine->RegisterGlobalFunction("void throw(const string &in)", asFUNCTION(ScriptThrow), asCALL_CDECL); assert(r >= 0);
r = engine->RegisterGlobalFunction("string getExceptionInfo()", asFUNCTION(ScriptGetExceptionInfo), asCALL_CDECL); assert(r >= 0);
}
else
{
r = engine->RegisterGlobalFunction("void throw(const string &in)", WRAP_FN(ScriptThrow), asCALL_GENERIC); assert(r >= 0);
r = engine->RegisterGlobalFunction("string getExceptionInfo()", WRAP_FN(ScriptGetExceptionInfo), asCALL_GENERIC); assert(r >= 0);
}
}
END_AS_NAMESPACE