Need to use it for casts regularly.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
struct encoder {
char *typename;
- int (*encoder)(struct lua_State *, const void *);
+ encoder_func encoder;
};
struct hash *encoder_hash;
}
void frrscript_register_type_encoder(const char *typename,
- int (*encoder)(lua_State *L, void *))
+ encoder_func encoder)
{
struct encoder e = {
.typename = (char *) typename,
#define FRRSCRIPT_PATH "/etc/frr/scripts"
+typedef int (*encoder_func)(struct lua_State *, const void *);
+
struct frrscript {
/* Script name */
char *name;
* 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.