diff options
author | Jakub Łuczyński <doubleloop@o2.pl> | 2020-02-07 20:20:41 +0100 |
---|---|---|
committer | Jakub Łuczyński <doubleloop@o2.pl> | 2020-02-13 14:11:32 +0100 |
commit | c769b15fe49fb56151df065b40a80d69fb15b4fc (patch) | |
tree | 01470e023a97f595cd40fe73e09e797f69566dd7 | |
parent | 700d7a037c60abe2a76c4949bdc81b5421de4a8c (diff) | |
download | rneovim-c769b15fe49fb56151df065b40a80d69fb15b4fc.tar.gz rneovim-c769b15fe49fb56151df065b40a80d69fb15b4fc.tar.bz2 rneovim-c769b15fe49fb56151df065b40a80d69fb15b4fc.zip |
fix: func_init
-rw-r--r-- | src/nvim/eval.c | 3 | ||||
-rw-r--r-- | src/nvim/eval/user_funcs.c | 5 | ||||
-rw-r--r-- | src/nvim/eval/user_funcs.h | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a676c6a16f..beea4d05e1 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18,6 +18,7 @@ #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/edit.h" +#include "nvim/eval/user_funcs.h" #include "nvim/eval.h" #include "nvim/eval/encode.h" #include "nvim/eval/executor.h" @@ -326,7 +327,7 @@ void eval_init(void) init_var_dict(&vimvardict, &vimvars_var, VAR_SCOPE); vimvardict.dv_lock = VAR_FIXED; hash_init(&compat_hashtab); - hash_init(&func_hashtab); + func_init(); for (size_t i = 0; i < ARRAY_SIZE(vimvars); i++) { p = &vimvars[i]; diff --git a/src/nvim/eval/user_funcs.c b/src/nvim/eval/user_funcs.c index a4031b4b5e..7de9922f96 100644 --- a/src/nvim/eval/user_funcs.c +++ b/src/nvim/eval/user_funcs.c @@ -63,6 +63,11 @@ static char *e_funcdict = N_("E717: Dictionary entry already exists"); static char *e_funcref = N_("E718: Funcref required"); static char *e_nofunc = N_("E130: Unknown function: %s"); +void func_init(void) +{ + hash_init(&func_hashtab); +} + /// Get function arguments. static int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, int *varargs, bool skip) diff --git a/src/nvim/eval/user_funcs.h b/src/nvim/eval/user_funcs.h index 3c714c042d..81a5ac12b4 100644 --- a/src/nvim/eval/user_funcs.h +++ b/src/nvim/eval/user_funcs.h @@ -1,7 +1,7 @@ #ifndef NVIM_EVAL_USER_FUNCS_H #define NVIM_EVAL_USER_FUNCS_H -#include "nvim/eval/typeval.h" +#include "nvim/eval/typval.h" ///< Structure used by trans_function_name() typedef struct { |