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, 3 insertions, 6 deletions
diff --git a/src/mime.c b/src/mime.c
index 5b1d5e8..594135f 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -8,6 +8,7 @@
8 8
9#include <lua.h> 9#include <lua.h>
10#include <lauxlib.h> 10#include <lauxlib.h>
11#include <compat-5.1.h>
11 12
12#include "mime.h" 13#include "mime.h"
13 14
@@ -77,13 +78,9 @@ static UC b64unbase[256];
77/*-------------------------------------------------------------------------*\ 78/*-------------------------------------------------------------------------*\
78* Initializes module 79* Initializes module
79\*-------------------------------------------------------------------------*/ 80\*-------------------------------------------------------------------------*/
80MIME_API int luaopen_mime(lua_State *L) 81MIME_API int luaopen_lmime(lua_State *L)
81{ 82{
82 /* whoever is loading the library replaced the global environment 83 luaL_module(L, "mime", func, 0);
83 * with the namespace table */
84 lua_pushvalue(L, LUA_GLOBALSINDEX);
85 /* export functions */
86 luaL_openlib(L, NULL, func, 0);
87 /* initialize lookup tables */ 84 /* initialize lookup tables */
88 qpsetup(qpclass, qpunbase); 85 qpsetup(qpclass, qpunbase);
89 b64setup(b64unbase); 86 b64setup(b64unbase);