mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-04-16 07:17:04 +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/path.cpp
|
||||||
src/runtime_methods/env.cpp
|
src/runtime_methods/env.cpp
|
||||||
src/runtime_methods/process.cpp
|
src/runtime_methods/process.cpp
|
||||||
src/runtime_methods/sdl2.cpp
|
|
||||||
src/types/async.cpp
|
src/types/async.cpp
|
||||||
src/types/associativearray.cpp
|
src/types/associativearray.cpp
|
||||||
src/types/any.cpp
|
src/types/any.cpp
|
||||||
|
|||||||
@@ -1805,7 +1805,6 @@ class GC {
|
|||||||
bool canRegisterOGC;
|
bool canRegisterOGC;
|
||||||
bool canRegisterEnv;
|
bool canRegisterEnv;
|
||||||
bool canRegisterClass;
|
bool canRegisterClass;
|
||||||
bool canRegisterSDL2;
|
|
||||||
bool sqlite3Scoped;
|
bool sqlite3Scoped;
|
||||||
bool locked;
|
bool locked;
|
||||||
};
|
};
|
||||||
@@ -1865,7 +1864,6 @@ class GC {
|
|||||||
static void RegisterEnv(GC* gc, TRootEnvironment* env);
|
static void RegisterEnv(GC* gc, TRootEnvironment* env);
|
||||||
static void RegisterProcess(GC* gc, TRootEnvironment* env);
|
static void RegisterProcess(GC* gc, TRootEnvironment* env);
|
||||||
static void RegisterClass(GC* gc, TRootEnvironment* env);
|
static void RegisterClass(GC* gc, TRootEnvironment* env);
|
||||||
static void RegisterSDL2(GC* gc,TRootEnvironment* env);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TSubEnvironment : public TEnvironment
|
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;
|
if(this->db == nullptr) return nullptr;
|
||||||
std::vector<std::vector<std::pair<std::string, std::optional<std::string>>>> res;
|
std::vector<std::vector<std::pair<std::string, std::optional<std::string>>>> res;
|
||||||
|
|
||||||
this->db->Exec(arg,res);
|
this->db->Exec(arg,res);
|
||||||
|
|
||||||
TList* list = TList::Create(ls);
|
TList* list = TList::Create(ls);
|
||||||
@@ -101,7 +102,12 @@ namespace Tesses::CrossLang {
|
|||||||
std::string cmd;
|
std::string cmd;
|
||||||
if(GetArgumentHeap(args,0,sql) && GetArgument(args,1,cmd))
|
if(GetArgumentHeap(args,0,sql) && GetArgument(args,1,cmd))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return sql->CallMethod(ls,"Exec",{cmd});
|
return sql->CallMethod(ls,"Exec",{cmd});
|
||||||
|
} catch(std::runtime_error& ex)
|
||||||
|
{
|
||||||
|
return (std::string)ex.what();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Undefined();
|
return Undefined();
|
||||||
|
|||||||
@@ -3370,13 +3370,7 @@ namespace Tesses::CrossLang {
|
|||||||
cse.back()->Push(gc,nullptr);
|
cse.back()->Push(gc,nullptr);
|
||||||
return false;
|
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(key == "RegisterConsole")
|
||||||
{
|
{
|
||||||
if((myEnv->permissions.canRegisterEverything || myEnv->permissions.canRegisterConsole) && !rootEnv->permissions.locked)
|
if((myEnv->permissions.canRegisterEverything || myEnv->permissions.canRegisterConsole) && !rootEnv->permissions.locked)
|
||||||
@@ -6410,44 +6404,27 @@ namespace Tesses::CrossLang {
|
|||||||
{
|
{
|
||||||
stk->Push(gc, tryC->Call(ls,{}));
|
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)
|
catch(std::exception& ex)
|
||||||
{
|
{
|
||||||
TDictionary* dict = TDictionary::Create(ls);
|
TDictionary* dict = TDictionary::Create(ls);
|
||||||
auto gc = ls.GetGC();
|
auto gc = ls.GetGC();
|
||||||
|
auto myEx = dynamic_cast<VMByteCodeException*>(&ex);
|
||||||
|
if(myEx != nullptr)
|
||||||
|
{
|
||||||
|
stk->Push(gc, catchC->Call(ls,{myEx->exception}));
|
||||||
|
} else {
|
||||||
gc->BarrierBegin();
|
gc->BarrierBegin();
|
||||||
|
|
||||||
dict->SetValue("Type","NativeException");
|
dict->SetValue("Type","NativeException");
|
||||||
dict->SetValue("Text",ex.what());
|
dict->SetValue("Text",ex.what());
|
||||||
gc->BarrierEnd();
|
gc->BarrierEnd();
|
||||||
|
|
||||||
stk->Push(gc, catchC->Call(ls,{dict}));
|
stk->Push(gc, catchC->Call(ls,{dict}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user