]> git.puffer.fish Git - mirror/frr.git/commit
lib: Add decoder functions
authorDonald Lee <dlqs@gmx.com>
Sun, 20 Jun 2021 00:25:22 +0000 (08:25 +0800)
committerDonald Lee <dlqs@gmx.com>
Mon, 21 Jun 2021 21:02:03 +0000 (05:02 +0800)
commit3a3cfe4762753dbd5744acaa02153c49f6c73fe1
tree53a29163daef84516c7568a4e311834be4926fc6
parentc2642aab24cdbfc7a0b0b203aca9835d52d938ef
lib: Add decoder functions

Split existing lua_to* functions into two functions:
 - lua_decode_*: unmarshall Lua values into an existing C data structure
 - lua_to*: allocate *and* unmarshall Lua values into C data structure
This allows us to mutate C data structures passed into frrscript_call,
without allocation

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