]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Enable consecutive frrscript_call
authorDonald Lee <dlqs@gmx.com>
Mon, 9 Aug 2021 23:07:06 +0000 (07:07 +0800)
committerDonald Lee <dlqs@gmx.com>
Mon, 9 Aug 2021 23:35:32 +0000 (07:35 +0800)
commit2ed598ba6bdbd8b6b6c6e9a091faad15306d19de
tree270667e3a4625d96541e63e4bfed232dee963b4f
parent80bfe93670461bfc868c6252e2f15bd44586cd4e
lib: Enable consecutive frrscript_call

Previous:
 - frrscript_load: push Lua function onto stack
 - frrscript_call: calls Lua function

Now:
 - frrscript_load: checks Lua function
 - frrscript_call: pushes and calls Lua function (first clear the stack)

So now we just need one frrscript_load for consecutive frrscript_call.
frrscript_call does not recompile or reload the script file, it just
keys it from the global Lua table (where it should already be).

Signed-off-by: Donald Lee <dlqs@gmx.com>
lib/frrscript.c
lib/frrscript.h