diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-02-04 14:29:11 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-02-04 14:29:11 +0000 |
commit | 0b2542d1a61fc5425ff65ab3dbf7ba7de174763f (patch) | |
tree | 8a6188e11db0c9ef6891c31e8a1bebca050b23b2 /src/inet.c | |
parent | f67864f86c7d703325e86b14d0ba33992c52891b (diff) | |
download | luasocket-0b2542d1a61fc5425ff65ab3dbf7ba7de174763f.tar.gz luasocket-0b2542d1a61fc5425ff65ab3dbf7ba7de174763f.tar.bz2 luasocket-0b2542d1a61fc5425ff65ab3dbf7ba7de174763f.zip |
Worked on the manual.
Implemented stuffing (needs test)
Added cddb and qp examples.
Diffstat (limited to 'src/inet.c')
-rw-r--r-- | src/inet.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -35,17 +35,10 @@ static luaL_reg func[] = { | |||
35 | /*-------------------------------------------------------------------------*\ | 35 | /*-------------------------------------------------------------------------*\ |
36 | * Initializes module | 36 | * Initializes module |
37 | \*-------------------------------------------------------------------------*/ | 37 | \*-------------------------------------------------------------------------*/ |
38 | void inet_open(lua_State *L) | 38 | int inet_open(lua_State *L) |
39 | { | 39 | { |
40 | lua_pushstring(L, LUASOCKET_LIBNAME); | 40 | lua_pushstring(L, LUASOCKET_LIBNAME); |
41 | lua_gettable(L, LUA_GLOBALSINDEX); | 41 | lua_gettable(L, LUA_GLOBALSINDEX); |
42 | if (lua_isnil(L, -1)) { | ||
43 | lua_pop(L, 1); | ||
44 | lua_newtable(L); | ||
45 | lua_pushstring(L, LUASOCKET_LIBNAME); | ||
46 | lua_pushvalue(L, -2); | ||
47 | lua_settable(L, LUA_GLOBALSINDEX); | ||
48 | } | ||
49 | lua_pushstring(L, "dns"); | 42 | lua_pushstring(L, "dns"); |
50 | lua_newtable(L); | 43 | lua_newtable(L); |
51 | luaL_openlib(L, NULL, func, 0); | 44 | luaL_openlib(L, NULL, func, 0); |