lua_pushinteger(L, *time);
}
+void lua_pushintegerp(lua_State *L, const int *num)
+{
+ lua_pushinteger(L, *num);
+}
+
/*
* Logging.
*
*/
void lua_pushsockunion(lua_State *L, const union sockunion *su);
+/*
+ * Push integer. This just wraps lua_pushinteger(), but it takes a pointer, so
+ * as to be compatible with the encoder_func signature.
+ */
+void lua_pushintegerp(lua_State *L, const int *num);
+
/*
* Retrieve an integer from table on the top of the stack.
*
"Lua type encoders");
/* Register core library types */
+ frrscript_register_type_encoder("integer", (encoder_func) lua_pushintegerp);
+ frrscript_register_type_encoder("string", (encoder_func) lua_pushstring);
frrscript_register_type_encoder("prefix", (encoder_func)lua_pushprefix);
frrscript_register_type_encoder("interface",
(encoder_func)lua_pushinterface);
+ frrscript_register_type_encoder("sockunion", (encoder_func) lua_pushsockunion);
+ frrscript_register_type_encoder("in_addr", (encoder_func) lua_pushinaddr);
+ frrscript_register_type_encoder("in6_addr", (encoder_func) lua_pushin6addr);
+ frrscript_register_type_encoder("time_t", (encoder_func) lua_pushtimet);
}