Mercurial > vim
comparison src/proto/vim9execute.pro @ 23285:112fa621b127 v8.2.2188
patch 8.2.2188: Vim9: crash when calling global function from :def function
Commit: https://github.com/vim/vim/commit/cd45ed03bfdd7fac53d562ad402df74bd26e7754
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 22 17:35:54 2020 +0100
patch 8.2.2188: Vim9: crash when calling global function from :def function
Problem: Vim9: crash when calling global function from :def function.
Solution: Set the outer context. Define the partial for the context on the
original function. Use a refcount to keep track of which ufunc is
using a dfunc. (closes #7525)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 22 Dec 2020 17:45:03 +0100 |
parents | 53acb89ec9f2 |
children | 1bb7fa4f9b35 |
comparison
equal
deleted
inserted
replaced
23284:3d54c7fa353c | 23285:112fa621b127 |
---|---|
1 /* vim9execute.c */ | 1 /* vim9execute.c */ |
2 void to_string_error(vartype_T vartype); | 2 void to_string_error(vartype_T vartype); |
3 void funcstack_check_refcount(funcstack_T *funcstack); | 3 void funcstack_check_refcount(funcstack_T *funcstack); |
4 int fill_partial_and_closure(partial_T *pt, ufunc_T *ufunc, ectx_T *ectx); | |
4 int call_def_function(ufunc_T *ufunc, int argc_arg, typval_T *argv, partial_T *partial, typval_T *rettv); | 5 int call_def_function(ufunc_T *ufunc, int argc_arg, typval_T *argv, partial_T *partial, typval_T *rettv); |
5 void ex_disassemble(exarg_T *eap); | 6 void ex_disassemble(exarg_T *eap); |
6 int tv2bool(typval_T *tv); | 7 int tv2bool(typval_T *tv); |
7 void emsg_using_string_as(typval_T *tv, int as_number); | 8 void emsg_using_string_as(typval_T *tv, int as_number); |
8 int check_not_string(typval_T *tv); | 9 int check_not_string(typval_T *tv); |