aboutsummaryrefslogtreecommitdiff
path: root/src/mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mime.c')
-rw-r--r--src/mime.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mime.c b/src/mime.c
index 4539e2c..4dfcae5 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -6,10 +6,13 @@
6\*=========================================================================*/ 6\*=========================================================================*/
7#include <string.h> 7#include <string.h>
8 8
9#include <lua.h> 9#include "lua.h"
10#include <lauxlib.h> 10#include "lauxlib.h"
11 11
12#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501)
12#include "compat-5.1.h" 13#include "compat-5.1.h"
14#endif
15
13#include "mime.h" 16#include "mime.h"
14 17
15/*=========================================================================*\ 18/*=========================================================================*\
@@ -81,6 +84,10 @@ static UC b64unbase[256];
81MIME_API int luaopen_mime_core(lua_State *L) 84MIME_API int luaopen_mime_core(lua_State *L)
82{ 85{
83 luaL_openlib(L, "mime", func, 0); 86 luaL_openlib(L, "mime", func, 0);
87 /* make version string available to scripts */
88 lua_pushstring(L, "_VERSION");
89 lua_pushstring(L, MIME_VERSION);
90 lua_rawset(L, -3);
84 /* initialize lookup tables */ 91 /* initialize lookup tables */
85 qpsetup(qpclass, qpunbase); 92 qpsetup(qpclass, qpunbase);
86 b64setup(b64unbase); 93 b64setup(b64unbase);