mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
refactor(lua): use Arena when converting from lua stack to API args
and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
This commit is contained in:
@@ -2591,7 +2591,7 @@ static char *get_healthcheck_names(expand_T *xp FUNC_ATTR_UNUSED, int idx)
|
||||
if (last_gen != get_cmdline_last_prompt_id() || last_gen == 0) {
|
||||
Array a = ARRAY_DICT_INIT;
|
||||
Error err = ERROR_INIT;
|
||||
Object res = nlua_exec(STATIC_CSTR_AS_STRING("return vim.health._complete()"), a, &err);
|
||||
Object res = NLUA_EXEC_STATIC("return vim.health._complete()", a, kRetObject, NULL, &err);
|
||||
api_clear_error(&err);
|
||||
api_free_object(names);
|
||||
names = res;
|
||||
|
Reference in New Issue
Block a user