aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Łuczyński <doubleloop@o2.pl>2020-02-10 12:03:55 +0100
committerJakub Łuczyński <doubleloop@o2.pl>2020-02-13 14:11:39 +0100
commitb683957763f4c804d343aec9242ff5e67e0b8653 (patch)
tree5e69412da2ce3a7413e12198b218f3e3141e2aa6
parent04f7e1f56d5f8c92fad49504e0f2215fdd72d326 (diff)
downloadrneovim-b683957763f4c804d343aec9242ff5e67e0b8653.tar.gz
rneovim-b683957763f4c804d343aec9242ff5e67e0b8653.tar.bz2
rneovim-b683957763f4c804d343aec9242ff5e67e0b8653.zip
fix: prof functions
-rw-r--r--src/nvim/eval.c4
-rw-r--r--src/nvim/eval/user_funcs.c5
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)
{