mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Improvements on LUA build scripts and support for LUA 5.2
This commit is contained in:
committed by
Felipe Zimmerle
parent
de36fca86a
commit
c98e665475
@@ -83,7 +83,11 @@ bool Lua::load(std::string script, std::string *err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef WITH_LUA_5_2
|
||||
if (lua_dump(L, Lua::blob_keeper, reinterpret_cast<void *>(&m_blob))) {
|
||||
#else
|
||||
if (lua_dump(L, Lua::blob_keeper, reinterpret_cast<void *>(&m_blob), 0)) {
|
||||
#endif
|
||||
const char *luaerr = lua_tostring(L, -1);
|
||||
err->assign("Failed to compile script '" + script + "");
|
||||
if (luaerr) {
|
||||
@@ -95,7 +99,6 @@ bool Lua::load(std::string script, std::string *err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
lua_close(L);
|
||||
return true;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user