Skip to content

Commit

Permalink
lib: Adopt Lua stuff for Lua 5.4
Browse files Browse the repository at this point in the history
lua_pcall() returns LUA_ERRGCMM in 5.3 which is already deprecated.

The constant LUA_ERRGCMM was removed.
Errors in finalizers are never propagated; instead, they generate a warning.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jan 13, 2025
1 parent 708f2ca commit a39aa3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/frrscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,12 @@ int _frrscript_call_lua(struct lua_function_state *lfs, int nargs)
zlog_err("Lua hook call '%s' : error handler error: %s",
lfs->name, lua_tostring(lfs->L, -1));
break;
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM <= 503
case LUA_ERRGCMM:
zlog_err("Lua hook call '%s' : garbage collector error: %s",
lfs->name, lua_tostring(lfs->L, -1));
break;
#endif
default:
zlog_err("Lua hook call '%s' : unknown error: %s", lfs->name,
lua_tostring(lfs->L, -1));
Expand Down

0 comments on commit a39aa3e

Please sign in to comment.