MINOR: hlua: declare hlua_gethlua() function

Declaring hlua_gethlua() function to make it usable from hlua_fcn.c.
This commit is contained in:
Aurelien DARRAGON 2023-05-04 13:59:48 +02:00 committed by Christopher Faulet
parent 34c86760fa
commit 40cd44f52c
2 changed files with 2 additions and 1 deletions

View File

@ -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 */

View File

@ -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;