diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-02-22 12:37:01 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-02-22 12:37:01 +1100 |
| commit | 4b2003c78a5e4270f384283f72d185cd4a40f30e (patch) | |
| tree | 6db70733ece111762f5aaf178d082716d8bd702a /src/app_console/app_console.cpp | |
| parent | 2a250855036047f4e3e37e51600276746d1c302a (diff) | |
| download | tangara-fw-4b2003c78a5e4270f384283f72d185cd4a40f30e.tar.gz | |
Make property bindings shared amongst all lua threads
Diffstat (limited to 'src/app_console/app_console.cpp')
| -rw-r--r-- | src/app_console/app_console.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index 33f41306..4e6c97ba 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -628,8 +628,7 @@ static const char kReplMain[] = "repl:run()\n"; int CmdLua(int argc, char** argv) { - std::unique_ptr<lua::LuaThread> context{ - lua::LuaThread::Start(*AppConsole::sServices)}; + auto context = lua::Registry::instance(*AppConsole::sServices).newThread(); if (!context) { return 1; } @@ -652,8 +651,7 @@ int CmdLua(int argc, char** argv) { } int CmdLuaRun(int argc, char** argv) { - std::unique_ptr<lua::LuaThread> context{ - lua::LuaThread::Start(*AppConsole::sServices)}; + auto context = lua::Registry::instance(*AppConsole::sServices).newThread(); if (!context) { return 1; } |
