diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-11 15:46:14 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-02-13 11:54:44 +0100 |
commit | 0353dd3029f9ce31c3894530385443a90f6677ee (patch) | |
tree | fa288427461ee2c1ce1c271d01a760977a161bf5 /src/nvim/api/deprecated.c | |
parent | 89135cff030b06f60cd596a9ae81cd9583987517 (diff) | |
download | rneovim-0353dd3029f9ce31c3894530385443a90f6677ee.tar.gz rneovim-0353dd3029f9ce31c3894530385443a90f6677ee.tar.bz2 rneovim-0353dd3029f9ce31c3894530385443a90f6677ee.zip |
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.
Diffstat (limited to 'src/nvim/api/deprecated.c')
-rw-r--r-- | src/nvim/api/deprecated.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c index dccaeb6922..c9a6036b8f 100644 --- a/src/nvim/api/deprecated.c +++ b/src/nvim/api/deprecated.c @@ -51,12 +51,12 @@ String nvim_command_output(uint64_t channel_id, String command, Error *err) /// @deprecated Use nvim_exec_lua() instead. /// @see nvim_exec_lua -Object nvim_execute_lua(String code, Array args, Error *err) +Object nvim_execute_lua(String code, Array args, Arena *arena, Error *err) FUNC_API_SINCE(3) FUNC_API_DEPRECATED_SINCE(7) FUNC_API_REMOTE_ONLY { - return nlua_exec(code, args, err); + return nlua_exec(code, args, kRetObject, arena, err); } /// Gets the buffer number |