aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/bit/je_lua_bit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/bit/je_lua_bit.cpp')
-rw-r--r--src/lua/modules/bit/je_lua_bit.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lua/modules/bit/je_lua_bit.cpp b/src/lua/modules/bit/je_lua_bit.cpp
index f182ebd..fdd0ae0 100644
--- a/src/lua/modules/bit/je_lua_bit.cpp
+++ b/src/lua/modules/bit/je_lua_bit.cpp
@@ -64,19 +64,20 @@ namespace JinEngine
return 1;
}
- LUA_IMPLEMENT const luaL_Reg f[] = {
- { "bAnd", l_and },
- { "bOr" , l_or },
- { "bXor", l_xor },
- { "bNot", l_not },
- { "bLs", l_lshift },
- { "bRs", l_rshift },
- { "bInc", l_include },
- { 0, 0 }
- };
-
+
LUA_EXPORT int luaopen_bit(lua_State* L)
{
+ luaL_Reg f[] = {
+ { "bAnd", l_and },
+ { "bOr" , l_or },
+ { "bXor", l_xor },
+ { "bNot", l_not },
+ { "bLs", l_lshift },
+ { "bRs", l_rshift },
+ { "bInc", l_include },
+ { 0, 0 }
+ };
+
luax_newlib(L, f);
return 1;