Mercurial > vim
diff src/vim9.h @ 22371:15003353a464 v8.2.1734
patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Commit: https://github.com/vim/vim/commit/148ce7ae62e92ecf6487a4ba5902ddb7e699074b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 23 21:57:23 2020 +0200
patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Problem: Vim9: cannot use a funcref for a closure twice.
Solution: Instead of putting the funcref on the stack use a growarray on the
execution context.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Sep 2020 22:00:06 +0200 |
parents | 6b385c2b9ff5 |
children | 4097509ecc1e |
line wrap: on
line diff
--- a/src/vim9.h +++ b/src/vim9.h @@ -244,7 +244,6 @@ typedef struct { // arguments to ISN_FUNCREF typedef struct { int fr_func; // function index - int fr_var_idx; // variable to store partial } funcref_T; // arguments to ISN_NEWFUNC @@ -323,7 +322,7 @@ struct dfunc_S { int df_instr_count; int df_varcount; // number of local variables - int df_closure_count; // number of closures created + int df_has_closure; // one if a closure was created }; // Number of entries used by stack frame for a function call.