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.c | |
| 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.c')
| -rw-r--r-- | lib/frrlua.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/frrlua.c b/lib/frrlua.c index eeac98ccd8..f768575b66 100644 --- a/lib/frrlua.c +++ b/lib/frrlua.c @@ -37,19 +37,6 @@ * stack easier. */ -const char *frrlua_table_get_string(lua_State *L, const char *key) -{ - const char *str; - - lua_pushstring(L, key); - lua_gettable(L, -2); - - str = (const char *)lua_tostring(L, -1); - lua_pop(L, 1); - - return str; -} - int frrlua_table_get_integer(lua_State *L, const char *key) { int result; @@ -70,7 +57,7 @@ int frrlua_table_get_integer(lua_State *L, const char *key) * datatypes. */ -int frrlua_newtable_prefix(lua_State *L, const struct prefix *prefix) +int lua_pushprefix(lua_State *L, const struct prefix *prefix) { char buffer[100]; @@ -87,7 +74,7 @@ int frrlua_newtable_prefix(lua_State *L, const struct prefix *prefix) return 0; } -int frrlua_newtable_interface(lua_State *L, const struct interface *ifp) +int lua_pushinterface(lua_State *L, const struct interface *ifp) { zlog_debug("frrlua: pushing interface table"); |
