diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-09 09:48:27 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-13 16:34:15 +0200 |
| commit | a39aa3eb379c62550437122de90c53874c5c04b6 (patch) | |
| tree | ce8dd6d6ed0836c0a1923307ab5ae626b4854211 /lib/frrscript.c | |
| parent | 708f2ca620f44a80f6231676e0d21a9c10ef4c66 (diff) | |
lib: Adopt Lua stuff for Lua 5.4
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 <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/frrscript.c')
| -rw-r--r-- | lib/frrscript.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c index 06460b014d..8b068ba61b 100644 --- a/lib/frrscript.c +++ b/lib/frrscript.c @@ -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)); |
