From 4b2003c78a5e4270f384283f72d185cd4a40f30e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 22 Feb 2024 12:37:01 +1100 Subject: Make property bindings shared amongst all lua threads --- src/app_console/app_console.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/app_console/app_console.cpp') 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 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 context{ - lua::LuaThread::Start(*AppConsole::sServices)}; + auto context = lua::Registry::instance(*AppConsole::sServices).newThread(); if (!context) { return 1; } -- cgit v1.2.3