forked from aniani/vim
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user