diff options
| author | Quentin Young <qlyoung@nvidia.com> | 2020-11-29 14:51:52 -0500 |
|---|---|---|
| committer | Quentin Young <qlyoung@nvidia.com> | 2020-12-01 18:37:14 -0500 |
| commit | 9e47ee98a3de9c7c3f6ee4eb527f59015a5515b5 (patch) | |
| tree | b783a74b8f1914c228af1123a03a085c2da94c2b /lib/frrlua.h | |
| parent | 224782816d52af6926122c7a036c66ac23e759a7 (diff) | |
lib: cleanup / refactor scripting foo
- fix 'struct lua_State'
- change includes to library style
- rename encoder funcs to look like lua_push* funcs
- fix erroneous doc comment on prefix encoder
- remove unused (and broken) convenience func
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/frrlua.h')
| -rw-r--r-- | lib/frrlua.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/frrlua.h b/lib/frrlua.h index 029e6ecee8..6e646e337d 100644 --- a/lib/frrlua.h +++ b/lib/frrlua.h @@ -21,9 +21,9 @@ #if defined(HAVE_LUA) -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" +#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> #include "prefix.h" #include "frrscript.h" @@ -34,15 +34,13 @@ extern "C" { /* * Pushes a new table containing relevant fields from a prefix structure. - * - * Additionally sets the global variable "prefix" to point at this table. */ -int frrlua_newtable_prefix(lua_State *L, const struct prefix *prefix); +int lua_pushprefix(lua_State *L, const struct prefix *prefix); /* * Pushes a new table containing relevant fields from an interface structure. */ -int frrlua_newtable_interface(lua_State *L, const struct interface *ifp); +int lua_pushinterface(lua_State *L, const struct interface *ifp); /* * Retrieve a string from table on the top of the stack. |
