From 75792c15480d3d99b2ba7e79e143e4b569b22611 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 13 Nov 2018 08:27:26 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9lua=20ref?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/net/je_lua_net.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lua/modules/net/je_lua_net.cpp') diff --git a/src/lua/modules/net/je_lua_net.cpp b/src/lua/modules/net/je_lua_net.cpp index 4240903..1d0204a 100644 --- a/src/lua/modules/net/je_lua_net.cpp +++ b/src/lua/modules/net/je_lua_net.cpp @@ -62,13 +62,10 @@ namespace Lua return 1; } - LUA_PORT int luaopen_Socket(lua_State* L); - LUA_PORT int luaopen_Buffer(lua_State* L); - LUA_EXPORT int luaopen_net(lua_State* L) { - luaopen_Socket(L); - luaopen_Buffer(L); + luax_newclass(L, luaopen_Socket); + luax_newclass(L, luaopen_Buffer); luaL_Reg f[] = { { "init", l_initNetwork }, -- cgit v1.1-26-g67d0