diff options
Diffstat (limited to 'tests/projects/other/native_module/modules/shared/foo/src/foo.c')
| -rw-r--r-- | tests/projects/other/native_module/modules/shared/foo/src/foo.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/projects/other/native_module/modules/shared/foo/src/foo.c b/tests/projects/other/native_module/modules/shared/foo/src/foo.c index 3024f9380..c8ac1c81c 100644 --- a/tests/projects/other/native_module/modules/shared/foo/src/foo.c +++ b/tests/projects/other/native_module/modules/shared/foo/src/foo.c @@ -16,14 +16,13 @@ static int sub(lua_State* lua) { return 1; } -static const luaL_Reg g_funcs[] = { - {"add", add}, - {"sub", sub}, - {NULL, NULL} -}; - int luaopen_foo(lua_State* lua) { + static const luaL_Reg funcs[] = { + {"add", add}, + {"sub", sub}, + {NULL, NULL} + }; lua_newtable(lua); - luaL_setfuncs(lua, g_funcs, 0); + luaL_setfuncs(lua, funcs, 0); return 1; } |
