diff options
author | chai <chaifix@163.com> | 2018-10-25 08:18:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-25 08:18:13 +0800 |
commit | 7322a090355af1989d7a1de0de431b6c89844fe2 (patch) | |
tree | c164a05b263007e18cc1c83c8183023d6a19ef82 /src/lua/modules/net/je_lua_buffer.cpp | |
parent | f889c9c20fc09f26eb8a70674c1d60181835c38a (diff) |
*增加lua导出宏
Diffstat (limited to 'src/lua/modules/net/je_lua_buffer.cpp')
-rw-r--r-- | src/lua/modules/net/je_lua_buffer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lua/modules/net/je_lua_buffer.cpp b/src/lua/modules/net/je_lua_buffer.cpp index d2342f3..fd73364 100644 --- a/src/lua/modules/net/je_lua_buffer.cpp +++ b/src/lua/modules/net/je_lua_buffer.cpp @@ -1,6 +1,6 @@ #include "lua/modules/luax.h" #include "lua/modules/types.h" -#include "lua/common/common.h" +#include "lua/common/je_lua_common.h" #include "libjin/jin.h" #include "je_lua_buffer.h" @@ -22,7 +22,7 @@ namespace JinEngine } // net.Buffer:append(value) -> value_length - static int l_append(lua_State* L) + LUA_IMPLEMENT int l_append(lua_State* L) { BufferRef ref = checkNetBuffer(L); const int vp = 2; @@ -66,7 +66,7 @@ namespace JinEngine } // net.Buffer:grabString(offset) -> string, length - static int l_grabString(lua_State* L) + LUA_IMPLEMENT int l_grabString(lua_State* L) { BufferRef ref = checkNetBuffer(L); int offset = luax_checkinteger(L, 2); @@ -80,7 +80,7 @@ namespace JinEngine } // net.Buffer:grabInteger(offset) -> integer, length - static int l_grabInteger(lua_State* L) + LUA_IMPLEMENT int l_grabInteger(lua_State* L) { BufferRef ref = checkNetBuffer(L); int offset = luax_checkinteger(L, 2); @@ -91,7 +91,7 @@ namespace JinEngine return 2; } - static int l_grabFloat(lua_State* L) + LUA_IMPLEMENT int l_grabFloat(lua_State* L) { BufferRef ref = checkNetBuffer(L); int offset = luax_checkinteger(L, 2); @@ -102,7 +102,7 @@ namespace JinEngine return 2; } - static int l_grabBoolean(lua_State* L) + LUA_IMPLEMENT int l_grabBoolean(lua_State* L) { BufferRef ref = checkNetBuffer(L); int offset = luax_checkinteger(L, 2); @@ -113,14 +113,14 @@ namespace JinEngine return 2; } - static int l_gc(lua_State* L) + LUA_IMPLEMENT int l_gc(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_NETWORK_BUFFER); proxy->release(); return 0; } - static const luaL_Reg netbuffer_function[] = { + LUA_IMPLEMENT const luaL_Reg netbuffer_function[] = { { "__gc", l_gc }, { "append", l_append }, { "grabString", l_grabString }, @@ -132,7 +132,7 @@ namespace JinEngine } // namespace Net - int luaopen_Buffer(lua_State* L) + LUA_EXPORT int luaopen_Buffer(lua_State* L) { luax_newtype(L, JIN_NETWORK_BUFFER, Net::netbuffer_function); return 0; |