Rework for git.tesses.org, GC* is std::shared_ptr maybe will fix crash during exit

This commit is contained in:
2026-04-30 16:00:00 -05:00
parent fca18e63a6
commit 991f2a217d
78 changed files with 1243 additions and 849 deletions

View File

@@ -10,7 +10,7 @@
#include <sstream>
#include <variant>
namespace Tesses::CrossLang {
bool InterperterThread::GetField(GC* gc)
bool InterperterThread::GetField(std::shared_ptr<GC> gc)
{
std::vector<CallStackEntry*>& cse=this->call_stack_entries;
@@ -47,6 +47,25 @@ namespace Tesses::CrossLang {
cse.back()->Push(gc, Undefined());
return false;
}
if(std::holds_alternative<std::shared_ptr<Tesses::Framework::TF_Timer_Handle>>(instance))
{
auto timer = std::get<std::shared_ptr<Tesses::Framework::TF_Timer_Handle>>(instance);
if(timer)
{
if(key == "Interval")
{
cse.back()->Push(gc, timer->GetIntervalMilliseconds());
return false;
}
if(key == "Enabled")
{
cse.back()->Push(gc, timer->GetEnabled());
return false;
}
}
cse.back()->Push(gc, Undefined());
return false;
}
if(std::holds_alternative<std::shared_ptr<Tesses::Framework::Filesystem::VFS>>(instance))
{
auto vfs = std::get<std::shared_ptr<Tesses::Framework::Filesystem::VFS>>(instance);