diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-08-05 14:08:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-05 14:08:28 +0200 |
commit | fd1d84c705128372dc25e3a833e9a1dc6b9e81e0 (patch) | |
tree | cd42ac3b29c6b2ac214bd81c3d11ece9dbd406c9 /src/nvim/eval/typval.c | |
parent | c7b100630ae65b904a722c57f1fde1d9669cc643 (diff) | |
parent | 1247684ae14e83c5b742be390de8dee00fd4e241 (diff) | |
download | rneovim-fd1d84c705128372dc25e3a833e9a1dc6b9e81e0.tar.gz rneovim-fd1d84c705128372dc25e3a833e9a1dc6b9e81e0.tar.bz2 rneovim-fd1d84c705128372dc25e3a833e9a1dc6b9e81e0.zip |
Merge pull request #29540 from bfredl/neoshada
refactor(shada): rework msgpack decoding without msgpack-c
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index c00abe452c..e7b6a0feee 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -485,13 +485,14 @@ void tv_list_append_tv(list_T *const l, typval_T *const tv) /// Like tv_list_append_tv(), but tv is moved to a list /// /// This means that it is no longer valid to use contents of the typval_T after -/// function exits. -void tv_list_append_owned_tv(list_T *const l, typval_T tv) +/// function exits. A pointer is returned to the allocated typval which can be used +typval_T *tv_list_append_owned_tv(list_T *const l, typval_T tv) FUNC_ATTR_NONNULL_ALL { listitem_T *const li = tv_list_item_alloc(); *TV_LIST_ITEM_TV(li) = tv; tv_list_append(l, li); + return TV_LIST_ITEM_TV(li); } /// Append a list to a list as one item |