summaryrefslogtreecommitdiff
path: root/src/mod_cml_lua.c
diff options
context:
space:
mode:
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);