aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/net/je_lua_net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/net/je_lua_net.cpp')
-rw-r--r--src/lua/modules/net/je_lua_net.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lua/modules/net/je_lua_net.cpp b/src/lua/modules/net/je_lua_net.cpp
index 178a93e..456bcf8 100644
--- a/src/lua/modules/net/je_lua_net.cpp
+++ b/src/lua/modules/net/je_lua_net.cpp
@@ -50,17 +50,15 @@ namespace Lua
}
}
Socket* socket = new Socket(info);
- Proxy* proxy = luax_newinstance(L, Jin_Lua_Socket);
- proxy->bind(new Shared<Socket>(socket, Jin_Lua_Socket));
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Socket, new Shared<Socket>(socket, Jin_Lua_Socket));
return 1;
}
LUA_IMPLEMENT int l_Buffer(lua_State* L)
{
int size = luax_checkinteger(L, 1);
- Proxy* proxy = luax_newinstance(L, Jin_Lua_Buffer);
Net::Buffer* buffer = new Net::Buffer(size);
- proxy->bind(new Shared<Buffer>(buffer, Jin_Lua_Buffer));
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Buffer, new Shared<Buffer>(buffer, Jin_Lua_Buffer));
return 1;
}
@@ -69,13 +67,13 @@ namespace Lua
luaopen_Socket(L);
luaopen_Buffer(L);
- luaL_Reg f[] = {
+ luaL_Reg methods[] = {
{ "init", l_initNetwork },
{ "newSocket", l_Socket },
{ "newBuffer", l_Buffer },
{ 0, 0 }
};
- luax_newlib(L, f);
+ luax_newlib(L, methods);
return 1;
}