From f6c627af20e48ae96bd17f4392ca74ce0ae90f36 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 26 Jun 2025 11:45:42 -0300 Subject: Cast added to 'add_history' MacOS defines 'add_history' with a "wrong" type (it returns 'int' instead of 'void'). --- lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 3fe9b7da..a90bf29b 100644 --- a/lua.c +++ b/lua.c @@ -488,8 +488,8 @@ static void lua_freeline (char *line) { static void lua_initreadline(lua_State *L) { UNUSED(L); rl_readline_name = "lua"; - l_readline = readline; - l_addhist = add_history; + l_readline = cast(l_readlineT, readline); + l_addhist = cast(l_addhistT, add_history); } #elif defined(LUA_USE_DLOPEN) && defined(LUA_READLINELIB) /* }{ */ -- cgit v1.2.3-55-g6feb