Skip to content
Snippets Groups Projects
Commit a2c55051 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

daemon/lua: disabled syntactic sugar, as the getenvf is not in Lua 5.2

parent 153ffd53
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,8 @@ static int engine_loadconf(struct engine *engine)
#include "daemon/lua/init.inc"
};
if (luaL_dostring(engine->L, l_init) != 0) {
fprintf(stderr, "[system] error %s\n", lua_tostring(engine->L, -1));
lua_pop(engine->L, 1);
return kr_error(ENOEXEC);
}
......@@ -216,7 +218,7 @@ static int engine_loadconf(struct engine *engine)
/* Evaluate */
if (ret != 0) {
fprintf(stderr, "error: %s\n", lua_tostring(engine->L, -1));
fprintf(stderr, "[system] error %s\n", lua_tostring(engine->L, -1));
lua_pop(engine->L, 1);
return kr_error(EINVAL);
}
......
......@@ -28,5 +28,5 @@ function protect(defined)
end
})
end
_G = protect(getfenv(0))
setfenv(0, _G)
-- _G = protect(getfenv(0))
-- setfenv(0, _G)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment