haproxy/include/proto/hlua_fcn.h
Thierry Fournier 45e78d7aa9 MINOR: lua: refactor the Lua object registration
All the HAProxy Lua object are declared with the same pattern:
 - Add the function __tosting which dumps the object name
 - Register the name in the Lua REGISTRY
 - Register the reference ID

These action are refactored in on function. This remove some
lines of code.
2016-03-30 15:43:52 +02:00

13 lines
521 B
C

#ifndef _PROTO_HLUA_FCN_H
#define _PROTO_HLUA_FCN_H
void hlua_class_const_int(lua_State *L, const char *name, int value);
void hlua_class_const_str(lua_State *L, const char *name, const char *value);
void hlua_class_function(lua_State *L, const char *name, int (*function)(lua_State *L));
void *hlua_checkudata(lua_State *L, int ud, int class_ref);
int hlua_register_metatable(struct lua_State *L, char *name);
int hlua_fcn_reg_core_fcn(lua_State *L);
int hlua_dump_object(lua_State *L);
#endif /* _PROTO_HLUA_FCN_H */