Hi Mike,

On Fri, Jan 02, 2026 at 03:23:03PM +0000, PR Bot wrote:
> From 53ceddc6a32ee7e3bde33b26e16a3fcbd44eb0df Mon Sep 17 00:00:00 2001
> From: Mike Lothian <[email protected]>
> Date: Fri, 2 Jan 2026 14:38:10 +0000
> Subject: [PATCH] MINOR: hlua: Add support for lua 5.5
> 
> ---
>  src/hlua.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/hlua.c b/src/hlua.c
> index 5109d3c04b33d..c3513cbca27ac 100644
> --- a/src/hlua.c
> +++ b/src/hlua.c
> @@ -14027,7 +14027,11 @@ lua_State *hlua_init_state(int thread_num)
>       struct prepend_path *pp;
>  
>       /* Init main lua stack. */
> +#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505
> +     L = lua_newstate(hlua_alloc, &hlua_global_allocator, 0);
> +#else
>       L = lua_newstate(hlua_alloc, &hlua_global_allocator);
> +#endif
>  
>       if (!L) {
>               fprintf(stderr,

OK looks good, however please provide a commit message explaining the
nature of the change, because when you run "git log" you have no code
context around to figure the why and how of the change. Here I'd say
something along this:

  Lua 5.5 adds an extra argument to lua_newstate(). Since there are
  already a few other ifdefs in hlua.c checking for the Lua version,
  and there's a single call place, let's do the same here. This should
  be safe for backporting if needed.

But feel free to tweak this as you see fit.

thanks!
Willy


Reply via email to