mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-04-16 08:57:03 +00:00
Remove SDL2
This commit is contained in:
@@ -139,7 +139,6 @@ src/runtime_methods/ogc.cpp
|
||||
src/runtime_methods/path.cpp
|
||||
src/runtime_methods/env.cpp
|
||||
src/runtime_methods/process.cpp
|
||||
src/runtime_methods/sdl2.cpp
|
||||
src/types/async.cpp
|
||||
src/types/associativearray.cpp
|
||||
src/types/any.cpp
|
||||
|
||||
@@ -1805,7 +1805,6 @@ class GC {
|
||||
bool canRegisterOGC;
|
||||
bool canRegisterEnv;
|
||||
bool canRegisterClass;
|
||||
bool canRegisterSDL2;
|
||||
bool sqlite3Scoped;
|
||||
bool locked;
|
||||
};
|
||||
@@ -1865,7 +1864,6 @@ class GC {
|
||||
static void RegisterEnv(GC* gc, TRootEnvironment* env);
|
||||
static void RegisterProcess(GC* gc, TRootEnvironment* env);
|
||||
static void RegisterClass(GC* gc, TRootEnvironment* env);
|
||||
static void RegisterSDL2(GC* gc,TRootEnvironment* env);
|
||||
};
|
||||
|
||||
class TSubEnvironment : public TEnvironment
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@ namespace Tesses::CrossLang {
|
||||
{
|
||||
if(this->db == nullptr) return nullptr;
|
||||
std::vector<std::vector<std::pair<std::string, std::optional<std::string>>>> res;
|
||||
|
||||
this->db->Exec(arg,res);
|
||||
|
||||
TList* list = TList::Create(ls);
|
||||
@@ -101,7 +102,12 @@ namespace Tesses::CrossLang {
|
||||
std::string cmd;
|
||||
if(GetArgumentHeap(args,0,sql) && GetArgument(args,1,cmd))
|
||||
{
|
||||
try {
|
||||
return sql->CallMethod(ls,"Exec",{cmd});
|
||||
} catch(std::runtime_error& ex)
|
||||
{
|
||||
return (std::string)ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
return Undefined();
|
||||
|
||||
@@ -3370,13 +3370,7 @@ namespace Tesses::CrossLang {
|
||||
cse.back()->Push(gc,nullptr);
|
||||
return false;
|
||||
}
|
||||
if(key == "RegisterSDL2")
|
||||
{
|
||||
if((myEnv->permissions.canRegisterEverything || myEnv->permissions.canRegisterSDL2)&& !rootEnv->permissions.locked)
|
||||
TStd::RegisterSDL2(gc, rootEnv);
|
||||
cse.back()->Push(gc,nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(key == "RegisterConsole")
|
||||
{
|
||||
if((myEnv->permissions.canRegisterEverything || myEnv->permissions.canRegisterConsole) && !rootEnv->permissions.locked)
|
||||
@@ -6410,38 +6404,18 @@ namespace Tesses::CrossLang {
|
||||
{
|
||||
stk->Push(gc, tryC->Call(ls,{}));
|
||||
}
|
||||
catch(TextException& ex)
|
||||
{
|
||||
|
||||
TDictionary* dict = TDictionary::Create(ls);
|
||||
auto gc = ls.GetGC();
|
||||
gc->BarrierBegin();
|
||||
dict->SetValue("Type","NativeException");
|
||||
dict->SetValue("Text",ex.what());
|
||||
gc->BarrierEnd();
|
||||
stk->Push(gc, catchC->Call(ls,{dict}));
|
||||
}
|
||||
catch(VMException& ex)
|
||||
{
|
||||
|
||||
TDictionary* dict = TDictionary::Create(ls);
|
||||
auto gc = ls.GetGC();
|
||||
gc->BarrierBegin();
|
||||
dict->SetValue("Type","NativeException");
|
||||
dict->SetValue("Text",ex.what());
|
||||
gc->BarrierEnd();
|
||||
stk->Push(gc, catchC->Call(ls,{dict}));
|
||||
}
|
||||
catch(VMByteCodeException& ex)
|
||||
{
|
||||
|
||||
stk->Push(gc, catchC->Call(ls,{ex.exception}));
|
||||
}
|
||||
catch(std::exception& ex)
|
||||
{
|
||||
TDictionary* dict = TDictionary::Create(ls);
|
||||
auto gc = ls.GetGC();
|
||||
auto myEx = dynamic_cast<VMByteCodeException*>(&ex);
|
||||
if(myEx != nullptr)
|
||||
{
|
||||
stk->Push(gc, catchC->Call(ls,{myEx->exception}));
|
||||
} else {
|
||||
gc->BarrierBegin();
|
||||
|
||||
dict->SetValue("Type","NativeException");
|
||||
dict->SetValue("Text",ex.what());
|
||||
gc->BarrierEnd();
|
||||
@@ -6449,6 +6423,9 @@ namespace Tesses::CrossLang {
|
||||
stk->Push(gc, catchC->Call(ls,{dict}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool InterperterThread::JumpConditional(GC* gc)
|
||||
|
||||
Reference in New Issue
Block a user