Skip to content

Commit 37b0f7c

Browse files
authored
Merge pull request #6782 from xmake-io/thread
update engine
2 parents b0bcb8b + 1176218 commit 37b0f7c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

core/src/xmake/engine.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@
6565
# include "lz4/prefix.h"
6666
#endif
6767

68-
// for lua
69-
#ifndef USE_LUAJIT
70-
# include "../../lua/lua/lstate.h"
71-
#endif
72-
7368
/* //////////////////////////////////////////////////////////////////////////////////////
7469
* macros
7570
*/
@@ -1418,13 +1413,8 @@ static tb_bool_t xm_engine_extract_programfiles(xm_engine_t* engine, tb_char_t c
14181413

14191414
static tb_void_t xm_engine_bind_to_lua(lua_State* lua, xm_engine_t* engine)
14201415
{
1421-
#ifdef USE_LUAJIT
14221416
lua_pushlightuserdata(lua, engine);
14231417
lua_setglobal(lua, "__global_engine");
1424-
#else
1425-
global_State* g = G(lua);
1426-
g->ud = engine;
1427-
#endif
14281418
}
14291419

14301420
/* //////////////////////////////////////////////////////////////////////////////////////
@@ -1764,12 +1754,7 @@ xm_engine_ref_t xm_engine_get(lua_State* lua)
17641754
{
17651755
tb_assert_and_check_return_val(lua, tb_null);
17661756

1767-
#ifdef USE_LUAJIT
17681757
lua_getglobal(lua, "__global_engine");
17691758
return (xm_engine_ref_t)lua_touserdata(lua, -1);
1770-
#else
1771-
global_State* g = G(lua);
1772-
return (xm_engine_ref_t)g->ud;
1773-
#endif
17741759
}
17751760

0 commit comments

Comments
 (0)