Mercurial > vim
diff src/structs.h @ 14927:162d79d273e6 v8.1.0475
patch 8.1.0475: memory not freed on exit when quit in autocmd
commit https://github.com/vim/vim/commit/27e80c885bcb5c5cf6a6462d71d6c81b06ba2451
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 14 21:41:01 2018 +0200
patch 8.1.0475: memory not freed on exit when quit in autocmd
Problem: Memory not freed on exit when quit in autocmd.
Solution: Remember funccal stack when executing autocmd.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 Oct 2018 21:45:04 +0200 |
parents | 6f2ce3b311de |
children | 9c030bc201a6 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -1354,7 +1354,7 @@ typedef struct int uf_cleared; /* func_clear() was already called */ garray_T uf_args; /* arguments */ garray_T uf_lines; /* function lines */ -#ifdef FEAT_PROFILE +# ifdef FEAT_PROFILE int uf_profiling; /* TRUE when func is being profiled */ int uf_prof_initialized; /* profiling the function as a whole */ @@ -1371,7 +1371,7 @@ typedef struct proftime_T uf_tml_wait; /* start wait time for current line */ int uf_tml_idx; /* index of line being timed; -1 if none */ int uf_tml_execed; /* line being timed was executed */ -#endif +# endif sctx_T uf_script_ctx; /* SCTX where function was defined, used for s: variables */ int uf_refcount; /* reference count, see func_name_refcount() */ @@ -1429,6 +1429,12 @@ typedef struct dictitem_T *fd_di; /* Dictionary item used */ } funcdict_T; +typedef struct funccal_entry funccal_entry_T; +struct funccal_entry { + void *top_funccal; + funccal_entry_T *next; +}; + #else /* dummy typedefs for function prototypes */ typedef struct