From c7e59fb376453e5abad8c862b52eb0f4c7ba829b Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 12 Nov 2018 22:23:35 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/bit/je_lua_bit.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/lua/modules/bit/je_lua_bit.cpp') 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; -- cgit v1.1-26-g67d0