summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-05 23:08:29 +0800
committerruki <[email protected]>2024-04-05 23:08:29 +0800
commitddd7ea7659ce5cc7bda3841897e1c44fc3b05f54 (patch)
treebdad016a6e974740185494488759dfd36b1e29ab
parentbcce486dd75ee32d83cb536c3ea58c406944a3cf (diff)
fix tolstring
-rw-r--r--tests/projects/other/native_module_cjson/test.lua3
-rw-r--r--xmake/scripts/module/xmi.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/projects/other/native_module_cjson/test.lua b/tests/projects/other/native_module_cjson/test.lua
new file mode 100644
index 000000000..b57362078
--- /dev/null
+++ b/tests/projects/other/native_module_cjson/test.lua
@@ -0,0 +1,3 @@
+function main(t)
+ t:build()
+end
diff --git a/xmake/scripts/module/xmi.h b/xmake/scripts/module/xmi.h
index da5e16906..b9d3201ce 100644
--- a/xmake/scripts/module/xmi.h
+++ b/xmake/scripts/module/xmi.h
@@ -609,7 +609,7 @@ typedef struct xmi_lua_ops_t_ {
int (*_lua_dump)(lua_State* lua, lua_Writer writer, void* data, int strip);
// luaL functions
-#ifdef XMI_USE_LUAJIT
+#ifndef XMI_USE_LUAJIT
const char* (*_luaL_tolstring)(lua_State* lua, int idx, size_t* len);
int (*_luaL_typeerror)(lua_State* lua, int arg, const char* tname);
#endif