aboutsummaryrefslogtreecommitdiff
path: root/src/mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mime.c')
-rw-r--r--src/mime.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mime.c b/src/mime.c
index dddd3d6..ea8876e 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -81,7 +81,16 @@ static UC b64unbase[256];
81\*-------------------------------------------------------------------------*/ 81\*-------------------------------------------------------------------------*/
82MIME_API int luaopen_mime_core(lua_State *L) 82MIME_API int luaopen_mime_core(lua_State *L)
83{ 83{
84#if LUA_VERSION_NUM > 501
85 lua_newtable(L);
86#ifdef LUASOCKET_USE_GLOBAL
87 lua_setglobal(L,"mime");
88 lua_getglobal(L,"mime");
89#endif
90 luaL_setfuncs(L,func,0);
91#else
84 luaL_openlib(L, "mime", func, 0); 92 luaL_openlib(L, "mime", func, 0);
93#endif
85 /* make version string available to scripts */ 94 /* make version string available to scripts */
86 lua_pushstring(L, "_VERSION"); 95 lua_pushstring(L, "_VERSION");
87 lua_pushstring(L, MIME_VERSION); 96 lua_pushstring(L, MIME_VERSION);