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.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lua/modules/bit/je_lua_bit.cpp b/src/lua/modules/bit/je_lua_bit.cpp
index cedd60a..f182ebd 100644
--- a/src/lua/modules/bit/je_lua_bit.cpp
+++ b/src/lua/modules/bit/je_lua_bit.cpp
@@ -1,5 +1,7 @@
+#include "lua/common/je_lua_common.h"
#include "lua/modules/luax.h"
#include "libjin/jin.h"
+
#include <cstdlib>
namespace JinEngine
@@ -7,7 +9,7 @@ namespace JinEngine
namespace Lua
{
- static int l_and(lua_State* L)
+ LUA_IMPLEMENT int l_and(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -15,7 +17,7 @@ namespace JinEngine
return 1;
}
- static int l_or(lua_State* L)
+ LUA_IMPLEMENT int l_or(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -23,7 +25,7 @@ namespace JinEngine
return 1;
}
- static int l_xor(lua_State* L)
+ LUA_IMPLEMENT int l_xor(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -31,14 +33,14 @@ namespace JinEngine
return 1;
}
- static int l_not(lua_State* L)
+ LUA_IMPLEMENT int l_not(lua_State* L)
{
int n = luax_checkinteger(L, 1);
luax_pushinteger(L, ~n);
return 1;
}
- static int l_lshift(lua_State* L)
+ LUA_IMPLEMENT int l_lshift(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -46,7 +48,7 @@ namespace JinEngine
return 1;
}
- static int l_rshift(lua_State* L)
+ LUA_IMPLEMENT int l_rshift(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -54,7 +56,7 @@ namespace JinEngine
return 1;
}
- static int l_include(lua_State* L)
+ LUA_IMPLEMENT int l_include(lua_State* L)
{
int a = luax_checkinteger(L, 1);
int b = luax_checkinteger(L, 2);
@@ -62,7 +64,7 @@ namespace JinEngine
return 1;
}
- static const luaL_Reg f[] = {
+ LUA_IMPLEMENT const luaL_Reg f[] = {
{ "bAnd", l_and },
{ "bOr" , l_or },
{ "bXor", l_xor },
@@ -73,7 +75,7 @@ namespace JinEngine
{ 0, 0 }
};
- int luaopen_bit(lua_State* L)
+ LUA_EXPORT int luaopen_bit(lua_State* L)
{
luax_newlib(L, f);