diff src/proto/vim9execute.pro @ 30299:5c181bb6c855

patch 9.0.0485: in :def function all closures in loop get the same variables Commit: https://github.com/vim/vim/commit/0cdfb7ce462393595b0308dcabf343e82f05319d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 17 15:44:52 2022 +0100 patch 9.0.0485: in :def function all closures in loop get the same variables Problem: In a :def function all closures in a loop get the same variables. Solution: Make a copy of loop variables used in a closure.
author Bram Moolenaar <Bram@vim.org>
date Sat, 17 Sep 2022 16:45:04 +0200
parents 61a688be1899
children 6a1ed021a0c0
line wrap: on
line diff
--- a/src/proto/vim9execute.pro
+++ b/src/proto/vim9execute.pro
@@ -13,6 +13,8 @@ int fill_partial_and_closure(partial_T *
 int may_load_script(int sid, int *loaded);
 typval_T *lookup_debug_var(char_u *name);
 int may_break_in_function(ufunc_T *ufunc);
+void loopvars_check_refcount(loopvars_T *loopvars);
+int set_ref_in_loopvars(int copyID);
 int exe_typval_instr(typval_T *tv, typval_T *rettv);
 char_u *exe_substitute_instr(void);
 int call_def_function(ufunc_T *ufunc, int argc_arg, typval_T *argv, int flags, partial_T *partial, funccall_T *funccal, typval_T *rettv);