summaryrefslogtreecommitdiff
path: root/src/mod_cml_lua.c
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2012-11-21 23:03:41 +0100
committerArno Töll <arno@debian.org>2012-11-21 23:03:41 +0100
commit6a6df8dc258631c6eaccb03bf08845241f6dfa4a (patch)
tree01eee8de64a85e5e2fef929050663ea2d3c850bd /src/mod_cml_lua.c
parentec2cb646eff482dfe32955d01781b01211b0a77c (diff)
downloadlighttpd-6a6df8dc258631c6eaccb03bf08845241f6dfa4a.tar.gz
Imported Upstream version 1.4.12upstream/1.4.12
Diffstat (limited to 'src/mod_cml_lua.c')
-rw-r--r--src/mod_cml_lua.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mod_cml_lua.c b/src/mod_cml_lua.c
index 76e979f..ded53b8 100644
--- a/src/mod_cml_lua.c
+++ b/src/mod_cml_lua.c
@@ -31,6 +31,7 @@ typedef char HASHHEX[HASHHEXLEN+1];
#include <lua.h>
#include <lualib.h>
+#include <lauxlib.h>
typedef struct {
stream st;
@@ -220,14 +221,9 @@ int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn) {
stream_open(&rm.st, fn);
/* push the lua file to the interpreter and see what happends */
- L = lua_open();
-
- luaopen_base(L);
- luaopen_table(L);
- luaopen_string(L);
- luaopen_math(L);
- luaopen_io(L);
-
+ L = luaL_newstate();
+ luaL_openlibs(L);
+
/* register functions */
lua_register(L, "md5", f_crypto_md5);
lua_register(L, "file_mtime", f_file_mtime);