To: vim_dev@googlegroups.com Subject: Patch 8.2.1601 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1601 Problem: Vim9: cannot use 'true" with garbagecollect(). Solution: Use tv_get_bool(). (closes #6871) Files: src/evalfunc.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.1600/src/evalfunc.c 2020-09-05 17:18:22.501432257 +0200 --- src/evalfunc.c 2020-09-05 17:28:59.070982819 +0200 *************** *** 2936,2942 **** // using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". want_garbage_collect = TRUE; ! if (argvars[0].v_type != VAR_UNKNOWN && tv_get_number(&argvars[0]) == 1) garbage_collect_at_exit = TRUE; } --- 2936,2942 ---- // using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". want_garbage_collect = TRUE; ! if (argvars[0].v_type != VAR_UNKNOWN && tv_get_bool(&argvars[0]) == 1) garbage_collect_at_exit = TRUE; } *** ../vim-8.2.1600/src/testdir/test_vim9_func.vim 2020-09-05 17:18:22.501432257 +0200 --- src/testdir/test_vim9_func.vim 2020-09-05 17:27:42.179339275 +0200 *************** *** 1285,1290 **** --- 1285,1294 ---- assert_equal(6, res) enddef + def Test_garbagecollect() + garbagecollect(true) + enddef + def Test_insert_return_type() let l = insert([2, 1], 3) let res = 0 *** ../vim-8.2.1600/src/version.c 2020-09-05 17:18:22.501432257 +0200 --- src/version.c 2020-09-05 17:30:04.586696220 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1601, /**/ -- "Hegel was right when he said that we learn from history that man can never learn anything from history." (George Bernard Shaw) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///