Cast added to 'add_history'

MacOS defines 'add_history' with a "wrong" type (it returns 'int'
instead of 'void').
This commit is contained in:
Roberto Ierusalimschy
2025-06-26 11:45:42 -03:00
parent 270a58c062
commit f6c627af20

4
lua.c
View File

@@ -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) /* }{ */