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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/modules/net/je_lua_net.cpp b/src/lua/modules/net/je_lua_net.cpp
index cd454d5..58ece43 100644
--- a/src/lua/modules/net/je_lua_net.cpp
+++ b/src/lua/modules/net/je_lua_net.cpp
@@ -48,7 +48,7 @@ namespace Lua
}
}
Socket* socket = new Socket(info);
- Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_NETWORK_SOCKET, sizeof(Proxy));
+ Proxy* proxy = luax_newinstance(L, JIN_NETWORK_SOCKET);
proxy->bind(new Shared<Socket>(socket, JIN_NETWORK_SOCKET));
return 1;
}
@@ -56,7 +56,7 @@ namespace Lua
LUA_IMPLEMENT int l_Buffer(lua_State* L)
{
int size = luax_checkinteger(L, 1);
- Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_NETWORK_BUFFER, sizeof(Proxy));
+ Proxy* proxy = luax_newinstance(L, JIN_NETWORK_BUFFER);
Net::Buffer* buffer = new Net::Buffer(size);
proxy->bind(new Shared<Buffer>(buffer, JIN_NETWORK_BUFFER));
return 1;