summaryrefslogtreecommitdiff
path: root/lib/frrscript.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2020-11-28 23:33:27 -0500
committerQuentin Young <qlyoung@nvidia.com>2020-12-01 18:37:14 -0500
commitf944ec671c3a3e56bf2315d26f7840419bf0a074 (patch)
tree30b0b2d2e78b768006f4adbff42bd7a61781b63a /lib/frrscript.h
parent3d19ffc5ef88022bc6be8daf052c4720b81b1bc7 (diff)
lib: make encoder type a typedef
Need to use it for casts regularly. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/frrscript.h')
-rw-r--r--lib/frrscript.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/frrscript.h b/lib/frrscript.h
index 2988d90aa8..6891200def 100644
--- a/lib/frrscript.h
+++ b/lib/frrscript.h
@@ -27,6 +27,8 @@ extern "C" {
#define FRRSCRIPT_PATH "/etc/frr/scripts"
+typedef int (*encoder_func)(struct lua_State *, const void *);
+
struct frrscript {
/* Script name */
char *name;
@@ -59,8 +61,7 @@ void frrscript_unload(struct frrscript *fs);
* associated with the chosen 'tname' to the provided stack.
*
*/
-void frrscript_register_type_encoder(const char *tname,
- int (*encoder)(lua_State *, void *));
+void frrscript_register_type_encoder(const char *tname, encoder_func encoder);
/*
* Initialize scripting subsystem. Call this before anything else.