From 11762187927c2c94b789324be1a84085619097a6 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 8 Sep 2025 23:53:42 +0800 Subject: update engine --- core/src/xmake/engine.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'core/src') 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 } -- cgit v1.3.1