]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 8.2.2188: Vim9: crash when calling global function from :def function v8.2.2188
authorBram Moolenaar <Bram@vim.org>
Tue, 22 Dec 2020 16:35:54 +0000 (17:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 22 Dec 2020 16:35:54 +0000 (17:35 +0100)
commitcd45ed03bfdd7fac53d562ad402df74bd26e7754
tree08509cca8dd5a9615671f1d0f3fc50fa0b4f5ef0
parent07761a3b965ec3be0c8d52aae9b6dc09c2127d27
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)
src/proto/userfunc.pro
src/proto/vim9compile.pro
src/proto/vim9execute.pro
src/structs.h
src/testdir/test_vim9_func.vim
src/userfunc.c
src/version.c
src/vim9.h
src/vim9compile.c
src/vim9execute.c