aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-01 05:35:35 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-01 05:35:35 +0000
commit197aef23ce36844e86e732f26af1df9fc5f149da (patch)
treefdc7e11c0fd653c3c25360f532d0648b0e822ad9 /src/tcp.c
parenta7d5362caffb928e2947b9ef99d1165391a510da (diff)
downloadluasocket-197aef23ce36844e86e732f26af1df9fc5f149da.tar.gz
luasocket-197aef23ce36844e86e732f26af1df9fc5f149da.tar.bz2
luasocket-197aef23ce36844e86e732f26af1df9fc5f149da.zip
Compiles with g++.
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 8ab7d62..037a23a 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -117,7 +117,7 @@ static int meth_receive(lua_State *L)
117\*-------------------------------------------------------------------------*/ 117\*-------------------------------------------------------------------------*/
118static int meth_setoption(lua_State *L) 118static int meth_setoption(lua_State *L)
119{ 119{
120 p_tcp tcp = aux_checkgroup(L, "tcp{any}", 1); 120 p_tcp tcp = (p_tcp) aux_checkgroup(L, "tcp{any}", 1);
121 return opt_meth_setoption(L, opt, &tcp->sock); 121 return opt_meth_setoption(L, opt, &tcp->sock);
122} 122}
123 123
@@ -158,7 +158,7 @@ static int meth_accept(lua_State *L)
158 const char *err = sock_accept(&server->sock, &sock, NULL, NULL, tm); 158 const char *err = sock_accept(&server->sock, &sock, NULL, NULL, tm);
159 /* if successful, push client socket */ 159 /* if successful, push client socket */
160 if (!err) { 160 if (!err) {
161 p_tcp clnt = lua_newuserdata(L, sizeof(t_tcp)); 161 p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
162 aux_setclass(L, "tcp{client}", -1); 162 aux_setclass(L, "tcp{client}", -1);
163 /* initialize structure fields */ 163 /* initialize structure fields */
164 sock_setnonblocking(&sock); 164 sock_setnonblocking(&sock);