summaryrefslogtreecommitdiff
path: root/xmake/templates/c/module.shared/project/modules/shared/foo/src
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/templates/c/module.shared/project/modules/shared/foo/src')
-rw-r--r--xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c b/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c
index c8ac1c81c..a98baca02 100644
--- a/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c
+++ b/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c
@@ -1,6 +1,4 @@
-#include <stdlib.h>
-#include <lua.h>
-#include <lauxlib.h>
+#include <xmi.h>
static int add(lua_State* lua) {
int a = lua_tointeger(lua, 1);
@@ -16,7 +14,7 @@ static int sub(lua_State* lua) {
return 1;
}
-int luaopen_foo(lua_State* lua) {
+int luaopen(foo, lua_State* lua) {
static const luaL_Reg funcs[] = {
{"add", add},
{"sub", sub},
@@ -26,3 +24,4 @@ int luaopen_foo(lua_State* lua) {
luaL_setfuncs(lua, funcs, 0);
return 1;
}
+