Mercurial > vim
comparison src/proto/evalvars.pro @ 23171:bb7531f77529 v8.2.2131
patch 8.2.2131: Vim9: crash when lambda uses same var as assignment
Commit: https://github.com/vim/vim/commit/709664cca0b59b69caa1ed40ebfcf00b2c672693
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 12 14:33:41 2020 +0100
patch 8.2.2131: Vim9: crash when lambda uses same var as assignment
Problem: Vim9: crash when lambda uses same var as assignment.
Solution: Do not let lookup_local change lv_from_outer, make a copy.
(closes #7461)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Dec 2020 14:45:05 +0100 |
parents | 86a115a80262 |
children | 657216220293 |
comparison
equal
deleted
inserted
replaced
23170:586c5efd71b1 | 23171:bb7531f77529 |
---|---|
57 int eval_variable(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload); | 57 int eval_variable(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload); |
58 void check_vars(char_u *name, int len); | 58 void check_vars(char_u *name, int len); |
59 dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload); | 59 dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload); |
60 dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload); | 60 dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload); |
61 hashtab_T *get_script_local_ht(void); | 61 hashtab_T *get_script_local_ht(void); |
62 void *lookup_scriptvar(char_u *name, size_t len, cctx_T *dummy); | 62 int lookup_scriptvar(char_u *name, size_t len, void *lvar, cctx_T *dummy); |
63 hashtab_T *find_var_ht(char_u *name, char_u **varname); | 63 hashtab_T *find_var_ht(char_u *name, char_u **varname); |
64 char_u *get_var_value(char_u *name); | 64 char_u *get_var_value(char_u *name); |
65 void new_script_vars(scid_T id); | 65 void new_script_vars(scid_T id); |
66 void init_var_dict(dict_T *dict, dictitem_T *dict_var, int scope); | 66 void init_var_dict(dict_T *dict, dictitem_T *dict_var, int scope); |
67 void unref_var_dict(dict_T *dict); | 67 void unref_var_dict(dict_T *dict); |