diff options
| author | Liam Devine <dmail00@gmail.com> | 2011-07-04 23:31:14 +0100 |
|---|---|---|
| committer | Sam Roberts <vieuxtech@gmail.com> | 2012-04-11 13:33:34 -0700 |
| commit | e15ed19db6eb3385c1b35219c2dfa11953c3d47e (patch) | |
| tree | 4e38a0b05ac7cbaaa449f2b32dc959409ceae9ea /src/options.c | |
| parent | a984607f28d0a802acaf1a16da225234af769baa (diff) | |
| download | luasocket-e15ed19db6eb3385c1b35219c2dfa11953c3d47e.tar.gz luasocket-e15ed19db6eb3385c1b35219c2dfa11953c3d47e.tar.bz2 luasocket-e15ed19db6eb3385c1b35219c2dfa11953c3d47e.zip | |
Compiles with Lua 5.1.4 and Lua 5.2.0-beta, although the makefile needs sorting out to take maybe a version number and also the local paths need removing.
Diffstat (limited to 'src/options.c')
| -rw-r--r-- | src/options.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/options.c b/src/options.c index 281a00f..801adf9 100644 --- a/src/options.c +++ b/src/options.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include "auxiliar.h" | 11 | #include "auxiliar.h" |
| 12 | #include "options.h" | 12 | #include "options.h" |
| 13 | #include "inet.h" | 13 | #include "inet.h" |
| 14 | #include "lua_typeerror.h" | ||
| 14 | 15 | ||
| 15 | /*=========================================================================*\ | 16 | /*=========================================================================*\ |
| 16 | * Internal functions prototypes | 17 | * Internal functions prototypes |
| @@ -99,7 +100,7 @@ int opt_get_ip_multicast_loop(lua_State *L, p_socket ps) | |||
| 99 | int opt_set_linger(lua_State *L, p_socket ps) | 100 | int opt_set_linger(lua_State *L, p_socket ps) |
| 100 | { | 101 | { |
| 101 | struct linger li; /* obj, name, table */ | 102 | struct linger li; /* obj, name, table */ |
| 102 | if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE)); | 103 | if (!lua_istable(L, 3)) luaL_typeerror(L, 3, lua_typename(L, LUA_TTABLE)); |
| 103 | lua_pushstring(L, "on"); | 104 | lua_pushstring(L, "on"); |
| 104 | lua_gettable(L, 3); | 105 | lua_gettable(L, 3); |
| 105 | if (!lua_isboolean(L, -1)) | 106 | if (!lua_isboolean(L, -1)) |
| @@ -165,7 +166,7 @@ int opt_set_ip6_v6only(lua_State *L, p_socket ps) | |||
| 165 | static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) | 166 | static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) |
| 166 | { | 167 | { |
| 167 | struct ip_mreq val; /* obj, name, table */ | 168 | struct ip_mreq val; /* obj, name, table */ |
| 168 | if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE)); | 169 | if (!lua_istable(L, 3)) luaL_typeerror(L, 3, lua_typename(L, LUA_TTABLE)); |
| 169 | lua_pushstring(L, "multiaddr"); | 170 | lua_pushstring(L, "multiaddr"); |
| 170 | lua_gettable(L, 3); | 171 | lua_gettable(L, 3); |
| 171 | if (!lua_isstring(L, -1)) | 172 | if (!lua_isstring(L, -1)) |
