comparison 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
comparison
equal deleted inserted replaced
14926:f60f8f21f76f 14927:162d79d273e6
1352 int uf_flags; 1352 int uf_flags;
1353 int uf_calls; /* nr of active calls */ 1353 int uf_calls; /* nr of active calls */
1354 int uf_cleared; /* func_clear() was already called */ 1354 int uf_cleared; /* func_clear() was already called */
1355 garray_T uf_args; /* arguments */ 1355 garray_T uf_args; /* arguments */
1356 garray_T uf_lines; /* function lines */ 1356 garray_T uf_lines; /* function lines */
1357 #ifdef FEAT_PROFILE 1357 # ifdef FEAT_PROFILE
1358 int uf_profiling; /* TRUE when func is being profiled */ 1358 int uf_profiling; /* TRUE when func is being profiled */
1359 int uf_prof_initialized; 1359 int uf_prof_initialized;
1360 /* profiling the function as a whole */ 1360 /* profiling the function as a whole */
1361 int uf_tm_count; /* nr of calls */ 1361 int uf_tm_count; /* nr of calls */
1362 proftime_T uf_tm_total; /* time spent in function + children */ 1362 proftime_T uf_tm_total; /* time spent in function + children */
1369 proftime_T uf_tml_start; /* start time for current line */ 1369 proftime_T uf_tml_start; /* start time for current line */
1370 proftime_T uf_tml_children; /* time spent in children for this line */ 1370 proftime_T uf_tml_children; /* time spent in children for this line */
1371 proftime_T uf_tml_wait; /* start wait time for current line */ 1371 proftime_T uf_tml_wait; /* start wait time for current line */
1372 int uf_tml_idx; /* index of line being timed; -1 if none */ 1372 int uf_tml_idx; /* index of line being timed; -1 if none */
1373 int uf_tml_execed; /* line being timed was executed */ 1373 int uf_tml_execed; /* line being timed was executed */
1374 #endif 1374 # endif
1375 sctx_T uf_script_ctx; /* SCTX where function was defined, 1375 sctx_T uf_script_ctx; /* SCTX where function was defined,
1376 used for s: variables */ 1376 used for s: variables */
1377 int uf_refcount; /* reference count, see func_name_refcount() */ 1377 int uf_refcount; /* reference count, see func_name_refcount() */
1378 funccall_T *uf_scoped; /* l: local variables for closure */ 1378 funccall_T *uf_scoped; /* l: local variables for closure */
1379 char_u uf_name[1]; /* name of function (actually longer); can 1379 char_u uf_name[1]; /* name of function (actually longer); can
1426 { 1426 {
1427 dict_T *fd_dict; /* Dictionary used */ 1427 dict_T *fd_dict; /* Dictionary used */
1428 char_u *fd_newkey; /* new key in "dict" in allocated memory */ 1428 char_u *fd_newkey; /* new key in "dict" in allocated memory */
1429 dictitem_T *fd_di; /* Dictionary item used */ 1429 dictitem_T *fd_di; /* Dictionary item used */
1430 } funcdict_T; 1430 } funcdict_T;
1431
1432 typedef struct funccal_entry funccal_entry_T;
1433 struct funccal_entry {
1434 void *top_funccal;
1435 funccal_entry_T *next;
1436 };
1431 1437
1432 #else 1438 #else
1433 /* dummy typedefs for function prototypes */ 1439 /* dummy typedefs for function prototypes */
1434 typedef struct 1440 typedef struct
1435 { 1441 {