comparison src/evalfunc.c @ 22103:0825ae9948f7 v8.2.1601

patch 8.2.1601: Vim9: cannot use 'true" with garbagecollect() Commit: https://github.com/vim/vim/commit/2df47310422f4a77e85de7901a5299923a1addd3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 17:30:44 2020 +0200 patch 8.2.1601: Vim9: cannot use 'true" with garbagecollect() Problem: Vim9: cannot use 'true" with garbagecollect(). Solution: Use tv_get_bool(). (closes https://github.com/vim/vim/issues/6871)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 17:45:03 +0200
parents 0ee66f232839
children a71d7dcba862
comparison
equal deleted inserted replaced
22102:2a7b430646c4 22103:0825ae9948f7
2934 { 2934 {
2935 // This is postponed until we are back at the toplevel, because we may be 2935 // This is postponed until we are back at the toplevel, because we may be
2936 // using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". 2936 // using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]".
2937 want_garbage_collect = TRUE; 2937 want_garbage_collect = TRUE;
2938 2938
2939 if (argvars[0].v_type != VAR_UNKNOWN && tv_get_number(&argvars[0]) == 1) 2939 if (argvars[0].v_type != VAR_UNKNOWN && tv_get_bool(&argvars[0]) == 1)
2940 garbage_collect_at_exit = TRUE; 2940 garbage_collect_at_exit = TRUE;
2941 } 2941 }
2942 2942
2943 /* 2943 /*
2944 * "get()" function 2944 * "get()" function