aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-09-17 22:06:11 +0300
committerZyX <kp-pav@yandex.ru>2017-03-29 10:08:06 +0300
commit9898f36aa306d2a7f53fbe08c64048260992d3bb (patch)
tree2ff6b5350409b2c9f36127b1b1b8848856792ba0 /src/nvim/eval/typval.c
parent9b8beaff021fd83770fb5510904910de2e696263 (diff)
downloadrneovim-9898f36aa306d2a7f53fbe08c64048260992d3bb.tar.gz
rneovim-9898f36aa306d2a7f53fbe08c64048260992d3bb.tar.bz2
rneovim-9898f36aa306d2a7f53fbe08c64048260992d3bb.zip
unittests: Test tv_list_copy
Also found some bugs: 1. var_item_copy() always fails to copy v:_null_list and v:_null_dict. Fixing this should mean fixing `deepcopy(v:_null_list)` which should’ve been, but was not listed in #4615. This also fixes `deepcopy(v:_null_dict)`. 2. var_item_copy() crashes when trying to copy NULL string with `conv != NULL`. 3. `conv` argument is ignored when copying list unless `deep` is true, but it was not reflected in documentation. 4. `tv_dict_item_alloc_len()` allocated more memory then needed. 5. typvalt2lua was not able to handle self-referencing containers.
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r--src/nvim/eval/typval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index a26afb20c6..ae4199697f 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -424,6 +424,7 @@ void tv_list_append_number(list_T *const l, const varnumber_T n)
/// Make a copy of list
///
/// @param[in] conv If non-NULL, then all internal strings will be converted.
+/// Only used when `deep` is true.
/// @param[in] orig Original list to copy.
/// @param[in] deep If false, then shallow copy will be done.
/// @param[in] copyID See var_item_copy().