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)
diff --git a/src/proto/vim9compile.pro b/src/proto/vim9compile.pro
index a19088b..3f8ae13 100644
--- a/src/proto/vim9compile.pro
+++ b/src/proto/vim9compile.pro
@@ -18,7 +18,7 @@
int compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx);
void set_function_type(ufunc_T *ufunc);
void delete_instr(isn_T *isn);
-void clear_def_function(ufunc_T *ufunc);
void unlink_def_function(ufunc_T *ufunc);
+void link_def_function(ufunc_T *ufunc);
void free_def_functions(void);
/* vim: set ft=c : */