Mercurial > vim
comparison src/proto/vim9execute.pro @ 30333:fc0830246f49 v9.0.0502
patch 9.0.0502: a closure in a nested loop in a :def function does not work
Commit: https://github.com/vim/vim/commit/cc34181f9994d64f8c8fa2f5845eaf0cc963067f
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 19 15:54:34 2022 +0100
patch 9.0.0502: a closure in a nested loop in a :def function does not work
Problem: A closure in a nested loop in a :def function does not work.
Solution: Use an array of loopvars, one per loop level.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 19 Sep 2022 17:00:07 +0200 |
parents | 6a1ed021a0c0 |
children | 360f286b5869 |
comparison
equal
deleted
inserted
replaced
30332:462d122636b3 | 30333:fc0830246f49 |
---|---|
7 ectx_T *clear_currrent_ectx(void); | 7 ectx_T *clear_currrent_ectx(void); |
8 void restore_current_ectx(ectx_T *ectx); | 8 void restore_current_ectx(ectx_T *ectx); |
9 int add_defer_function(char_u *name, int argcount, typval_T *argvars); | 9 int add_defer_function(char_u *name, int argcount, typval_T *argvars); |
10 char_u *char_from_string(char_u *str, varnumber_T index); | 10 char_u *char_from_string(char_u *str, varnumber_T index); |
11 char_u *string_slice(char_u *str, varnumber_T first, varnumber_T last, int exclusive); | 11 char_u *string_slice(char_u *str, varnumber_T first, varnumber_T last, int exclusive); |
12 int fill_partial_and_closure(partial_T *pt, ufunc_T *ufunc, short loop_var_idx, short loop_var_count, ectx_T *ectx); | 12 int fill_partial_and_closure(partial_T *pt, ufunc_T *ufunc, loopvarinfo_T *loopvarinfo, ectx_T *ectx); |
13 int may_load_script(int sid, int *loaded); | 13 int may_load_script(int sid, int *loaded); |
14 typval_T *lookup_debug_var(char_u *name); | 14 typval_T *lookup_debug_var(char_u *name); |
15 int may_break_in_function(ufunc_T *ufunc); | 15 int may_break_in_function(ufunc_T *ufunc); |
16 void loopvars_check_refcount(loopvars_T *loopvars); | 16 int loopvars_check_refcount(loopvars_T *loopvars); |
17 int set_ref_in_loopvars(int copyID); | 17 int set_ref_in_loopvars(int copyID); |
18 int exe_typval_instr(typval_T *tv, typval_T *rettv); | 18 int exe_typval_instr(typval_T *tv, typval_T *rettv); |
19 char_u *exe_substitute_instr(void); | 19 char_u *exe_substitute_instr(void); |
20 int call_def_function(ufunc_T *ufunc, int argc_arg, typval_T *argv, int flags, partial_T *partial, funccall_T *funccal, typval_T *rettv); | 20 int call_def_function(ufunc_T *ufunc, int argc_arg, typval_T *argv, int flags, partial_T *partial, funccall_T *funccal, typval_T *rettv); |
21 void unwind_def_callstack(ectx_T *ectx); | 21 void unwind_def_callstack(ectx_T *ectx); |