aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/userfunc.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-12 13:45:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-12 14:15:03 +0800
commita93d29589ae1aab9f5fff11fccbe3ed14cb089ce (patch)
tree26815d394348a994820171a9cbc0f27678ff2e89 /src/nvim/eval/userfunc.c
parentc7ca94ba7f7a76caf51ed62b521f04c97c6aeed5 (diff)
downloadrneovim-a93d29589ae1aab9f5fff11fccbe3ed14cb089ce.tar.gz
rneovim-a93d29589ae1aab9f5fff11fccbe3ed14cb089ce.tar.bz2
rneovim-a93d29589ae1aab9f5fff11fccbe3ed14cb089ce.zip
vim-patch:8.1.1689: profiling code is spread out
Problem: Profiling code is spread out. Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan, closes vim/vim#4668) https://github.com/vim/vim/commit/660a10ad41c14363326f83451c3c425201923119
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r--src/nvim/eval/userfunc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index f31b86fc14..72a8c45326 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -45,7 +45,7 @@
# include "eval/userfunc.c.generated.h"
#endif
-hashtab_T func_hashtab;
+static hashtab_T func_hashtab;
// Used by get_func_tv()
static garray_T funcargs = GA_EMPTY_INIT_VALUE;
@@ -67,6 +67,12 @@ void func_init(void)
hash_init(&func_hashtab);
}
+/// Return the function hash table
+hashtab_T *func_tbl_get(void)
+{
+ return &func_hashtab;
+}
+
/// Get function arguments.
static int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, int *varargs,
garray_T *default_args, bool skip)