aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-02-04 14:29:11 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-02-04 14:29:11 +0000
commit0b2542d1a61fc5425ff65ab3dbf7ba7de174763f (patch)
tree8a6188e11db0c9ef6891c31e8a1bebca050b23b2 /src/inet.c
parentf67864f86c7d703325e86b14d0ba33992c52891b (diff)
downloadluasocket-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.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/inet.c b/src/inet.c
index d626b86..096e2e3 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -35,17 +35,10 @@ static luaL_reg func[] = {
35/*-------------------------------------------------------------------------*\ 35/*-------------------------------------------------------------------------*\
36* Initializes module 36* Initializes module
37\*-------------------------------------------------------------------------*/ 37\*-------------------------------------------------------------------------*/
38void inet_open(lua_State *L) 38int 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);