Added gethostname.

Cleaned up TODO.
Moved luasocket specific stuff from auxiliar.c to luasocket.c
This commit is contained in:
Diego Nehab
2004-01-19 18:22:51 +00:00
parent fbb42b80cb
commit 3f1712ed48
8 changed files with 145 additions and 106 deletions

View File

@ -17,24 +17,7 @@
\*-------------------------------------------------------------------------*/
void aux_open(lua_State *L)
{
/* create namespace table */
lua_pushstring(L, LUASOCKET_LIBNAME);
lua_newtable(L);
#ifdef LUASOCKET_DEBUG
lua_pushstring(L, "debug");
lua_pushnumber(L, 1);
lua_rawset(L, -3);
#endif
/* make version string available so scripts */
lua_pushstring(L, "version");
lua_pushstring(L, LUASOCKET_VERSION);
lua_rawset(L, -3);
/* store namespace as global */
lua_settable(L, LUA_GLOBALSINDEX);
/* make sure modules know what is our namespace */
lua_pushstring(L, "LUASOCKET_LIBNAME");
lua_pushstring(L, LUASOCKET_LIBNAME);
lua_settable(L, LUA_GLOBALSINDEX);
;
}
/*-------------------------------------------------------------------------*\