From 40cd44f52c9f2963260fad6ef1e08985aa9c1bec Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Thu, 4 May 2023 13:59:48 +0200 Subject: [PATCH] MINOR: hlua: declare hlua_gethlua() function Declaring hlua_gethlua() function to make it usable from hlua_fcn.c. --- include/haproxy/hlua.h | 1 + src/hlua.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/haproxy/hlua.h b/include/haproxy/hlua.h index 52eed06eb7..2031e5d21a 100644 --- a/include/haproxy/hlua.h +++ b/include/haproxy/hlua.h @@ -59,6 +59,7 @@ const char *hlua_show_current_location(const char *pfx); int hlua_ref(lua_State *L); void hlua_pushref(lua_State *L, int ref); void hlua_unref(lua_State *L, int ref); +struct hlua *hlua_gethlua(lua_State *L); #else /* USE_LUA */ diff --git a/src/hlua.c b/src/hlua.c index 2c68d4fbc4..98ee44170a 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1294,7 +1294,7 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp, * - hlua_gethlua : return the hlua context associated with an lua_State. * - hlua_sethlua : create the association between hlua context and lua_state. */ -static inline struct hlua *hlua_gethlua(lua_State *L) +inline struct hlua *hlua_gethlua(lua_State *L) { struct hlua **hlua = lua_getextraspace(L); return *hlua;