summaryrefslogtreecommitdiff
path: root/lib/frrlua.h
diff options
context:
space:
mode:
authorDonald Lee <dlqs@gmx.com>2021-08-10 04:41:25 +0800
committerQuentin Young <qlyoung@qlyoung.net>2023-11-20 20:45:02 -0500
commitd2acf63f16837caaadd093927c236b742c19fd75 (patch)
tree9a6b11c90de0c01a40ceb8e8d5fa60afb22bbb3e /lib/frrlua.h
parentac91b343d635f056e8de47224719ed6218e79dfb (diff)
lib: Create encoders for int and rename stuff
Create encoders/decoders for int and rename current int encoders /decoders to long long. Signed-off-by: Donald Lee <dlqs@gmx.com>
Diffstat (limited to 'lib/frrlua.h')
-rw-r--r--lib/frrlua.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/frrlua.h b/lib/frrlua.h
index 61fab328fe..dc0f4d9986 100644
--- a/lib/frrlua.h
+++ b/lib/frrlua.h
@@ -121,9 +121,9 @@ void lua_pushnexthop(lua_State *L, const struct nexthop *nexthop);
/*
* Converts an int to a Lua value and pushes it on the stack.
*/
-void lua_pushintegerp(lua_State *L, const long long *num);
+void lua_pushintegerp(lua_State *L, const int *num);
-void lua_decode_integerp(lua_State *L, int idx, long long *num);
+void lua_decode_integerp(lua_State *L, int idx, int *num);
/*
* Converts the Lua value at idx to an int.
@@ -133,6 +133,21 @@ void lua_decode_integerp(lua_State *L, int idx, long long *num);
*/
void *lua_tointegerp(lua_State *L, int idx);
+/*
+ * Converts a long long to a Lua value and pushes it on the stack.
+ */
+void lua_pushlonglongp(lua_State *L, const long long *num);
+
+void lua_decode_longlongp(lua_State *L, int idx, long long *num);
+
+/*
+ * Converts the Lua value at idx to a long long.
+ *
+ * Returns:
+ * long long allocated with MTYPE_TMP.
+ */
+void *lua_tolonglongp(lua_State *L, int idx);
+
void lua_decode_stringp(lua_State *L, int idx, char *str);
/*