Mercurial > vim
diff src/list.c @ 24160:e695db9a5465 v8.2.2621
patch 8.2.2621: typval2type() cannot handle recursive structures
Commit: https://github.com/vim/vim/commit/108cf0153c5770e343aec9e2390acdaa4a0b149a
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 18 22:15:04 2021 +0100
patch 8.2.2621: typval2type() cannot handle recursive structures
Problem: typval2type() cannot handle recursive structures.
Solution: Use copyID. (closes https://github.com/vim/vim/issues/7979)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Mar 2021 22:30:03 +0100 |
parents | 06da0685077b |
children | d406858354a6 |
line wrap: on
line diff
--- a/src/list.c +++ b/src/list.c @@ -2052,7 +2052,7 @@ filter_map(typval_T *argvars, typval_T * { // Check that map() does not change the type of the dict. ga_init2(&type_list, sizeof(type_T *), 10); - type = typval2type(argvars, &type_list); + type = typval2type(argvars, get_copyID(), &type_list); } if (argvars[0].v_type == VAR_BLOB) @@ -2558,7 +2558,7 @@ extend(typval_T *argvars, typval_T *rett { // Check that map() does not change the type of the dict. ga_init2(&type_list, sizeof(type_T *), 10); - type = typval2type(argvars, &type_list); + type = typval2type(argvars, get_copyID(), &type_list); } if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)