aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
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);