mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 01:26:58 +02:00
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.
13 lines
521 B
C
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 */
|