summaryrefslogtreecommitdiff
path: root/core/src/xmake/package/loadxmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/xmake/package/loadxmi.c')
-rw-r--r--core/src/xmake/package/loadxmi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/xmake/package/loadxmi.c b/core/src/xmake/package/loadxmi.c
index d45fda3bb..db4091431 100644
--- a/core/src/xmake/package/loadxmi.c
+++ b/core/src/xmake/package/loadxmi.c
@@ -29,11 +29,12 @@
* includes
*/
#include "prefix.h"
+#include "xmi.h"
/* //////////////////////////////////////////////////////////////////////////////////////
* types
*/
-typedef int (*xm_open_func_t)(lua_State* lua);
+typedef int (*xm_open_func_t)(xmi_lua_State* lua);
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
@@ -68,5 +69,8 @@ tb_int_t xm_package_loadxmi(lua_State* lua)
}
// load module
- return func(lua);
+ xmi_lua_State xmi_lua = {0};
+ xmi_lua._lua = lua;
+ xmi_lua._lua_createtable = &lua_createtable;
+ return func(&xmi_lua);
}