From 6a6df8dc258631c6eaccb03bf08845241f6dfa4a Mon Sep 17 00:00:00 2001 From: Arno Töll Date: Wed, 21 Nov 2012 23:03:41 +0100 Subject: Imported Upstream version 1.4.12 --- src/mod_cml_lua.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/mod_cml_lua.c') 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 #include +#include 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); -- cgit v1.2.3