mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
MINOR: hlua: Add support for lua 5.5
Lua 5.5 adds an extra argument to lua_newstate(). Since there are already a few other ifdefs in hlua.c checking for the Lua version, and there's a single call place, let's do the same here. This should be safe for backporting if needed. Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
This commit is contained in:
parent
853604f87a
commit
1c0f781994
1 changed files with 4 additions and 0 deletions
|
|
@ -14027,7 +14027,11 @@ lua_State *hlua_init_state(int thread_num)
|
||||||
struct prepend_path *pp;
|
struct prepend_path *pp;
|
||||||
|
|
||||||
/* Init main lua stack. */
|
/* Init main lua stack. */
|
||||||
|
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505
|
||||||
|
L = lua_newstate(hlua_alloc, &hlua_global_allocator, luaL_makeseed(0));
|
||||||
|
#else
|
||||||
L = lua_newstate(hlua_alloc, &hlua_global_allocator);
|
L = lua_newstate(hlua_alloc, &hlua_global_allocator);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!L) {
|
if (!L) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue