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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202009051531.085FVBWd637379%40masaka.moolenaar.net.