diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-19 21:21:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 21:21:05 +0100 |
commit | 8952a89db588db10a9dba16356f9bbd35ca5fabb (patch) | |
tree | ac34d55b77303deadef6a7ed3f4202259324a249 /src/nvim/api/command.c | |
parent | 8fdc84d0aaec63d57203bdef4b88047479ad4fc1 (diff) | |
parent | 404707c7606389ccb6c6062bfe9e2ff30a2552af (diff) | |
download | rneovim-8952a89db588db10a9dba16356f9bbd35ca5fabb.tar.gz rneovim-8952a89db588db10a9dba16356f9bbd35ca5fabb.tar.bz2 rneovim-8952a89db588db10a9dba16356f9bbd35ca5fabb.zip |
Merge pull request #27534 from bfredl/userarena
refactor(api): next PR to make use of the arena
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r-- | src/nvim/api/command.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c index a21c9e70a7..f2d5342a5f 100644 --- a/src/nvim/api/command.c +++ b/src/nvim/api/command.c @@ -1166,10 +1166,10 @@ err: /// @param[out] err Error details, if any. /// /// @returns Map of maps describing commands. -Dictionary nvim_get_commands(Dict(get_commands) *opts, Error *err) +Dictionary nvim_get_commands(Dict(get_commands) *opts, Arena *arena, Error *err) FUNC_API_SINCE(4) { - return nvim_buf_get_commands(-1, opts, err); + return nvim_buf_get_commands(-1, opts, arena, err); } /// Gets a map of buffer-local |user-commands|. @@ -1179,7 +1179,7 @@ Dictionary nvim_get_commands(Dict(get_commands) *opts, Error *err) /// @param[out] err Error details, if any. /// /// @returns Map of maps describing commands. -Dictionary nvim_buf_get_commands(Buffer buffer, Dict(get_commands) *opts, Error *err) +Dictionary nvim_buf_get_commands(Buffer buffer, Dict(get_commands) *opts, Arena *arena, Error *err) FUNC_API_SINCE(4) { bool global = (buffer == -1); @@ -1192,12 +1192,12 @@ Dictionary nvim_buf_get_commands(Buffer buffer, Dict(get_commands) *opts, Error api_set_error(err, kErrorTypeValidation, "builtin=true not implemented"); return (Dictionary)ARRAY_DICT_INIT; } - return commands_array(NULL); + return commands_array(NULL, arena); } buf_T *buf = find_buffer_by_handle(buffer, err); if (opts->builtin || !buf) { return (Dictionary)ARRAY_DICT_INIT; } - return commands_array(buf); + return commands_array(buf, arena); } |