From 990ddf1f967b1599907fcbb630aa58e1f21e6941 Mon Sep 17 00:00:00 2001 From: Bruce Date: Sat, 30 Dec 2023 00:21:25 +0800 Subject: [PATCH] Update lua_service.h --- moon-src/services/lua_service.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moon-src/services/lua_service.h b/moon-src/services/lua_service.h index 2fe071710..f69306a2b 100644 --- a/moon-src/services/lua_service.h +++ b/moon-src/services/lua_service.h @@ -22,6 +22,9 @@ class lua_service final : public moon::service static void* lalloc(void* ud, void* ptr, size_t osize, size_t nsize); public: + std::atomic_int trap = 0; + lua_State* activeL = nullptr; + static lua_service* get(lua_State* L); static int set_callback(lua_State* L); @@ -31,4 +34,4 @@ class lua_service final : public moon::service size_t mem_report = 8 * 1024 * 1024; callback_context* cb_ctx = nullptr; std::unique_ptr lua_; -}; \ No newline at end of file +};