mirror of
https://github.com/neovim/neovim.git
synced 2026-02-09 14:02:05 +10:00
refactor(api): make freeing of return-value opt-in instead of opt out
As only a few API functions make use of explicit freeing of the return value, make it opt-in instead. The arena is always present under the hood, so `Arena *arena` arg now doesn't mean anything other than getting access to this arena. Also it is in principle possible to return an allocated value while still using the arena as scratch space for other stuff (unlikely, but there no reason to not allow it).
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
/// @return Dictionary containing information about execution, with these keys:
|
||||
/// - output: (string|nil) Output if `opts.output` is true.
|
||||
Dictionary nvim_exec2(uint64_t channel_id, String src, Dict(exec_opts) *opts, Error *err)
|
||||
FUNC_API_SINCE(11)
|
||||
FUNC_API_SINCE(11) FUNC_API_RET_ALLOC
|
||||
{
|
||||
Dictionary result = ARRAY_DICT_INIT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user