diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-20 13:44:50 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-02-21 11:58:28 +0100 |
commit | 3cc54586be7760652e8bad88cae82ce74ef9432e (patch) | |
tree | d39cab2ecf5fb8f8bfc44ecf40c6fb2efb13a241 /src/nvim/generators/c_grammar.lua | |
parent | 9bb046d1be5aa9ba0482b2cad050b286d4b78978 (diff) | |
download | rneovim-3cc54586be7760652e8bad88cae82ce74ef9432e.tar.gz rneovim-3cc54586be7760652e8bad88cae82ce74ef9432e.tar.bz2 rneovim-3cc54586be7760652e8bad88cae82ce74ef9432e.zip |
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).
Diffstat (limited to 'src/nvim/generators/c_grammar.lua')
-rw-r--r-- | src/nvim/generators/c_grammar.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/generators/c_grammar.lua b/src/nvim/generators/c_grammar.lua index 1720b32919..8a3e70990a 100644 --- a/src/nvim/generators/c_grammar.lua +++ b/src/nvim/generators/c_grammar.lua @@ -47,6 +47,7 @@ local c_proto = Ct( * (fill * Cg((P('FUNC_API_SINCE(') * C(num ^ 1)) * P(')'), 'since') ^ -1) * (fill * Cg((P('FUNC_API_DEPRECATED_SINCE(') * C(num ^ 1)) * P(')'), 'deprecated_since') ^ -1) * (fill * Cg((P('FUNC_API_FAST') * Cc(true)), 'fast') ^ -1) + * (fill * Cg((P('FUNC_API_RET_ALLOC') * Cc(true)), 'ret_alloc') ^ -1) * (fill * Cg((P('FUNC_API_NOEXPORT') * Cc(true)), 'noexport') ^ -1) * (fill * Cg((P('FUNC_API_REMOTE_ONLY') * Cc(true)), 'remote_only') ^ -1) * (fill * Cg((P('FUNC_API_LUA_ONLY') * Cc(true)), 'lua_only') ^ -1) |