diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-14 18:50:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 18:50:44 -0400 |
commit | c57a85d53490fe53158a0cbd768941b732926d83 (patch) | |
tree | eea995585edb66a7522f20faaab27144ce30c271 /src/nvim/eval/typval.c | |
parent | ba04b3d8381c1573fabbe2c78abe87b2b0dd0026 (diff) | |
parent | 520b925627604a5c3030d4e59dc2caa2f6501736 (diff) | |
download | rneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.gz rneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.bz2 rneovim-c57a85d53490fe53158a0cbd768941b732926d83.zip |
Merge pull request #14532 from janlazo/vim-8.1.1433
vim-patch:8.0.1394,8.1.1967,8.2.{23,1000,1059,2354,2419,2433,2473,2850}
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 71e4edc667..d01c597c83 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -2106,6 +2106,13 @@ list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len) return l; } +dict_T *tv_dict_alloc_lock(VarLockStatus lock) +{ + dict_T *const d = tv_dict_alloc(); + d->dv_lock = lock; + return d; +} + /// Allocate an empty dictionary for a return value /// /// Also sets reference count. @@ -2114,9 +2121,8 @@ list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len) void tv_dict_alloc_ret(typval_T *const ret_tv) FUNC_ATTR_NONNULL_ALL { - dict_T *const d = tv_dict_alloc(); + dict_T *const d = tv_dict_alloc_lock(VAR_UNLOCKED); tv_dict_set_ret(ret_tv, d); - ret_tv->v_lock = VAR_UNLOCKED; } //{{{3 Clear |