aboutsummaryrefslogtreecommitdiff
path: root/src/lua/net/luaopen_net.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-18 22:15:27 +0800
committerchai <chaifix@163.com>2018-08-18 22:15:27 +0800
commit22bb9b537caff927ef8c83bde82d58253ffbb1e4 (patch)
treef5328481574fd65d3f8a8b444ef26f34eab2d701 /src/lua/net/luaopen_net.cpp
parent398966630f99329021d4335d819326e27a9d49df (diff)
*update
Diffstat (limited to 'src/lua/net/luaopen_net.cpp')
-rw-r--r--src/lua/net/luaopen_net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/net/luaopen_net.cpp b/src/lua/net/luaopen_net.cpp
index 5457c07..600f479 100644
--- a/src/lua/net/luaopen_net.cpp
+++ b/src/lua/net/luaopen_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->bind(new Ref<Socket>(socket), JIN_NETWORK_SOCKET);
+ proxy->bind(new Ref<Socket>(socket, JIN_NETWORK_SOCKET));
return 1;
}
@@ -58,7 +58,7 @@ namespace lua
int size = luax_checkinteger(L, 1);
Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_NETWORK_BUFFER, sizeof(Proxy));
net::Buffer* buffer = new net::Buffer(size);
- proxy->bind(new Ref<Buffer>(buffer), JIN_NETWORK_BUFFER);
+ proxy->bind(new Ref<Buffer>(buffer, JIN_NETWORK_BUFFER));
return 1;
}