Mercurial > vim
diff src/vim9execute.c @ 28002:1012048eed26 v8.2.4526
patch 8.2.4526: Vim9: cannot set variables to a null value
Commit: https://github.com/vim/vim/commit/8acb9cc6209768ca7ec75c9f7af8c389312ea8d6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 13:18:55 2022 +0000
patch 8.2.4526: Vim9: cannot set variables to a null value
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Mar 2022 14:30:05 +0100 |
parents | e6e3abc28c7a |
children | 53e2bf6032e5 |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3440,6 +3440,17 @@ exec_instructions(ectx_T *ectx) } break; + // create a partial with NULL value + case ISN_NEWPARTIAL: + if (GA_GROW_FAILS(&ectx->ec_stack, 1)) + goto theend; + ++ectx->ec_stack.ga_len; + tv = STACK_TV_BOT(-1); + tv->v_type = VAR_PARTIAL; + tv->v_lock = 0; + tv->vval.v_partial = NULL; + break; + // call a :def function case ISN_DCALL: SOURCING_LNUM = iptr->isn_lnum; @@ -5720,6 +5731,9 @@ list_instructions(char *pfx, isn_T *inst smsg("%s%4d NEWDICT size %lld", pfx, current, (varnumber_T)(iptr->isn_arg.number)); break; + case ISN_NEWPARTIAL: + smsg("%s%4d NEWPARTIAL", pfx, current); + break; // function call case ISN_BCALL: