diff options
| author | ruki <[email protected]> | 2024-04-04 00:24:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-04 00:24:53 +0800 |
| commit | b0bc1ce397bb4b700c989df01d11b65b72ca800f (patch) | |
| tree | a8382840fd0c628a8b05b11752f8a8819096fcad /core/src | |
| parent | fee2d1b5106761728134c179375c73f9283a7ba1 (diff) | |
fix xmiopen
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/package/loadxmi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/src/xmake/package/loadxmi.c b/core/src/xmake/package/loadxmi.c index b79e8cee4..501c5d680 100644 --- a/core/src/xmake/package/loadxmi.c +++ b/core/src/xmake/package/loadxmi.c @@ -61,8 +61,8 @@ tb_int_t xm_package_loadxmi(lua_State* lua) } // get xmiopen_xxx function - xm_open_func_t luaopen = (xm_open_func_t)tb_dynamic_func(lib, name); - if (!luaopen) + xm_open_func_t luaopen_func = (xm_open_func_t)tb_dynamic_func(lib, name); + if (!luaopen_func) { lua_pushnil(lua); lua_pushfstring(lua, "cannot get symbol %s failed", name); @@ -70,8 +70,8 @@ tb_int_t xm_package_loadxmi(lua_State* lua) } // get xmisetup function - xm_setup_func_t xmisetup = (xm_setup_func_t)tb_dynamic_func(lib, "xmisetup"); - if (!xmisetup) + xm_setup_func_t xmisetup_func = (xm_setup_func_t)tb_dynamic_func(lib, "xmisetup"); + if (!xmisetup_func) { lua_pushnil(lua); lua_pushfstring(lua, "cannot get symbol xmisetup failed"); @@ -81,8 +81,9 @@ tb_int_t xm_package_loadxmi(lua_State* lua) // setup lua interfaces xmi_lua_ops_t luaops = {0}; luaops._lua_createtable = &lua_createtable; - xmisetup(&luaops); + luaops._luaL_setfuncs = &luaL_setfuncs; + xmisetup_func(&luaops); // load module - return luaopen(lua); + return luaopen_func(lua); } |
