mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-03-26 08:52:20 +00:00
Remove SDL2
This commit is contained in:
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,44 +6404,27 @@ 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();
|
||||
|
||||
stk->Push(gc, catchC->Call(ls,{dict}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user