From f716446fa869ef4dc9663d69a3e4364ef2dcbb6b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 3 Apr 2024 23:55:17 +0800 Subject: use xmi.h --- core/src/xmake/package/loadxmi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/src/xmake/package') 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); } -- cgit v1.3.1