diff options
| author | ruki <[email protected]> | 2025-09-08 18:28:14 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-08 18:28:14 +0800 |
| commit | 37b0f7c8a80def21ad5def2bfbf2ea8376774b80 (patch) | |
| tree | 85c5b91e0a8bc2c75fa28ebf0895e1fb9735ae0a | |
| parent | b0bcb8b825b7538ad3523ce5b2cf8f4328fce6b8 (diff) | |
| parent | 11762187927c2c94b789324be1a84085619097a6 (diff) | |
Merge pull request #6782 from xmake-io/thread
update engine
| -rw-r--r-- | core/src/xmake/engine.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index ee07da6ea..1299cfc5f 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -65,11 +65,6 @@ # include "lz4/prefix.h" #endif -// for lua -#ifndef USE_LUAJIT -# include "../../lua/lua/lstate.h" -#endif - /* ////////////////////////////////////////////////////////////////////////////////////// * macros */ @@ -1418,13 +1413,8 @@ static tb_bool_t xm_engine_extract_programfiles(xm_engine_t* engine, tb_char_t c static tb_void_t xm_engine_bind_to_lua(lua_State* lua, xm_engine_t* engine) { -#ifdef USE_LUAJIT lua_pushlightuserdata(lua, engine); lua_setglobal(lua, "__global_engine"); -#else - global_State* g = G(lua); - g->ud = engine; -#endif } /* ////////////////////////////////////////////////////////////////////////////////////// @@ -1764,12 +1754,7 @@ xm_engine_ref_t xm_engine_get(lua_State* lua) { tb_assert_and_check_return_val(lua, tb_null); -#ifdef USE_LUAJIT lua_getglobal(lua, "__global_engine"); return (xm_engine_ref_t)lua_touserdata(lua, -1); -#else - global_State* g = G(lua); - return (xm_engine_ref_t)g->ud; -#endif } |
