mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
Manual is almost done. HTTP is missing.
Implemented new distribution scheme. Select is now purely C. HTTP reimplemented seems faster dunno why. LTN12 functions that coroutines fail gracefully.
This commit is contained in:
12
src/mime.c
12
src/mime.c
@ -76,7 +76,17 @@ static UC b64unbase[256];
|
||||
\*-------------------------------------------------------------------------*/
|
||||
MIME_API int luaopen_mime(lua_State *L)
|
||||
{
|
||||
lua_newtable(L);
|
||||
/* whoever is loading the library replaced the global environment
|
||||
* with the namespace table */
|
||||
lua_pushvalue(L, LUA_GLOBALSINDEX);
|
||||
/* make sure library is still "requirable" if initialized staticaly */
|
||||
lua_pushstring(L, "_LOADEDLIB");
|
||||
lua_gettable(L, -2);
|
||||
lua_pushstring(L, MIME_LIBNAME);
|
||||
lua_pushcfunction(L, (lua_CFunction) luaopen_mime);
|
||||
lua_settable(L, -3);
|
||||
lua_pop(L, 1);
|
||||
/* export functions */
|
||||
luaL_openlib(L, NULL, func, 0);
|
||||
/* initialize lookup tables */
|
||||
qpsetup(qpclass, qpunbase);
|
||||
|
Reference in New Issue
Block a user