diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 4 | ||||
-rw-r--r-- | src/nvim/eval/user_funcs.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index f7e7c3a2d8..7a107c3f80 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1131,7 +1131,7 @@ void *call_func_retlist(const char_u *func, int argc, typval_T *argv) void prof_child_enter(proftime_T *tm /* place to store waittime */ ) { - funccall_T *fc = current_funccal; + funccall_T *fc = get_current_funccal(); if (fc != NULL && fc->func->uf_profiling) { fc->prof_child = profile_start(); @@ -1147,7 +1147,7 @@ void prof_child_enter(proftime_T *tm /* place to store waittime */ void prof_child_exit(proftime_T *tm /* where waittime was stored */ ) { - funccall_T *fc = current_funccal; + funccall_T *fc = get_current_funccal(); if (fc != NULL && fc->func->uf_profiling) { fc->prof_child = profile_end(fc->prof_child); diff --git a/src/nvim/eval/user_funcs.c b/src/nvim/eval/user_funcs.c index 3c64e807ba..1b8d714566 100644 --- a/src/nvim/eval/user_funcs.c +++ b/src/nvim/eval/user_funcs.c @@ -1120,6 +1120,11 @@ void restore_funccal(void *vfc) current_funccal = (funccall_T *)vfc; } +funccall_T *get_current_funccal(void) +{ + return current_funccal; +} + #if defined(EXITFREE) void free_all_functions(void) { |