diff options
author | Paul Aurich <paul@darkrain42.org> | 2011-04-27 10:42:20 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2012-04-11 13:33:34 -0700 |
commit | 908ee2cce1740c3d873fe45b752c8aa1b1f3e306 (patch) | |
tree | 66168122e4b81645496325a0940d33d3c31ca42a /src/udp.c | |
parent | dd83e0a8494cfd28651b54c44d51e296ba16b8c4 (diff) | |
download | luasocket-908ee2cce1740c3d873fe45b752c8aa1b1f3e306.tar.gz luasocket-908ee2cce1740c3d873fe45b752c8aa1b1f3e306.tar.bz2 luasocket-908ee2cce1740c3d873fe45b752c8aa1b1f3e306.zip |
Fix two crashes and add -Wshadow so that this can't happen again.
The two crashes are the s/const char *// changes in tcp.c. The rest
is cleanup so it will build.
Diffstat (limited to 'src/udp.c')
-rw-r--r-- | src/udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -44,7 +44,7 @@ static int meth_setfd(lua_State *L); | |||
44 | static int meth_dirty(lua_State *L); | 44 | static int meth_dirty(lua_State *L); |
45 | 45 | ||
46 | /* udp object methods */ | 46 | /* udp object methods */ |
47 | static luaL_reg udp[] = { | 47 | static luaL_reg udp_methods[] = { |
48 | {"__gc", meth_close}, | 48 | {"__gc", meth_close}, |
49 | {"__tostring", auxiliar_tostring}, | 49 | {"__tostring", auxiliar_tostring}, |
50 | {"close", meth_close}, | 50 | {"close", meth_close}, |
@@ -98,8 +98,8 @@ static luaL_reg func[] = { | |||
98 | int udp_open(lua_State *L) | 98 | int udp_open(lua_State *L) |
99 | { | 99 | { |
100 | /* create classes */ | 100 | /* create classes */ |
101 | auxiliar_newclass(L, "udp{connected}", udp); | 101 | auxiliar_newclass(L, "udp{connected}", udp_methods); |
102 | auxiliar_newclass(L, "udp{unconnected}", udp); | 102 | auxiliar_newclass(L, "udp{unconnected}", udp_methods); |
103 | /* create class groups */ | 103 | /* create class groups */ |
104 | auxiliar_add2group(L, "udp{connected}", "udp{any}"); | 104 | auxiliar_add2group(L, "udp{connected}", "udp{any}"); |
105 | auxiliar_add2group(L, "udp{unconnected}", "udp{any}"); | 105 | auxiliar_add2group(L, "udp{unconnected}", "udp{any}"); |