diff options
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index fc6cea38c..1dd5612b9 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1934,7 +1934,7 @@ find_func_with_prefix(char_u *name, int sid) * Return NULL for unknown function. */ ufunc_T * -find_func_even_dead(char_u *name, int is_global, cctx_T *cctx UNUSED) +find_func_even_dead(char_u *name, int is_global) { hashitem_T *hi; ufunc_T *func; @@ -1970,9 +1970,9 @@ find_func_even_dead(char_u *name, int is_global, cctx_T *cctx UNUSED) * Return NULL for unknown or dead function. */ ufunc_T * -find_func(char_u *name, int is_global, cctx_T *cctx) +find_func(char_u *name, int is_global) { - ufunc_T *fp = find_func_even_dead(name, is_global, cctx); + ufunc_T *fp = find_func_even_dead(name, is_global); if (fp != NULL && (fp->uf_flags & FC_DEAD) == 0) return fp; @@ -2343,7 +2343,7 @@ func_clear_free(ufunc_T *fp, int force) int copy_func(char_u *lambda, char_u *global, ectx_T *ectx) { - ufunc_T *ufunc = find_func_even_dead(lambda, TRUE, NULL); + ufunc_T *ufunc = find_func_even_dead(lambda, TRUE); ufunc_T *fp = NULL; if (ufunc == NULL) @@ -2352,7 +2352,7 @@ copy_func(char_u *lambda, char_u *global, ectx_T *ectx) return FAIL; } - fp = find_func(global, TRUE, NULL); + fp = find_func(global, TRUE); if (fp != NULL) { // TODO: handle ! to overwrite @@ -3413,7 +3413,7 @@ call_func( * User defined function. */ if (fp == NULL) - fp = find_func(rfname, is_global, NULL); + fp = find_func(rfname, is_global); // Trigger FuncUndefined event, may load the function. if (fp == NULL @@ -3422,13 +3422,13 @@ call_func( && !aborting()) { // executed an autocommand, search for the function again - fp = find_func(rfname, is_global, NULL); + fp = find_func(rfname, is_global); } // Try loading a package. if (fp == NULL && script_autoload(rfname, TRUE) && !aborting()) { // loaded a package, search for the function again - fp = find_func(rfname, is_global, NULL); + fp = find_func(rfname, is_global); } if (fp == NULL) { @@ -3437,7 +3437,7 @@ call_func( // If using Vim9 script try not local to the script. // Don't do this if the name starts with "s:". if (p != NULL && (funcname[0] != 's' || funcname[1] != ':')) - fp = find_func(p, is_global, NULL); + fp = find_func(p, is_global); } if (fp != NULL && (fp->uf_flags & FC_DELETED)) @@ -4180,7 +4180,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) *p = NUL; if (!eap->skip && !got_int) { - fp = find_func(name, is_global, NULL); + fp = find_func(name, is_global); if (fp == NULL && ASCII_ISUPPER(*eap->arg)) { char_u *up = untrans_function_name(name); @@ -4188,7 +4188,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) // With Vim9 script the name was made script-local, if not // found try again with the original name. if (up != NULL) - fp = find_func(up, FALSE, NULL); + fp = find_func(up, FALSE); } if (fp != NULL) @@ -4403,7 +4403,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) { if (fudi.fd_dict != NULL && fudi.fd_newkey == NULL) emsg(_(e_dictionary_entry_already_exists)); - else if (name != NULL && find_func(name, is_global, NULL) != NULL) + else if (name != NULL && find_func(name, is_global) != NULL) emsg_funcname(e_function_str_already_exists_add_bang_to_replace, name); } @@ -4437,7 +4437,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) goto erret; } - fp = find_func_even_dead(name, is_global, NULL); + fp = find_func_even_dead(name, is_global); if (vim9script) { char_u *uname = untrans_function_name(name); @@ -4792,7 +4792,7 @@ translated_function_exists(char_u *name, int is_global) { if (builtin_function(name, -1)) return has_internal_func(name); - return find_func(name, is_global, NULL) != NULL; + return find_func(name, is_global) != NULL; } /* @@ -4939,7 +4939,7 @@ ex_delfunction(exarg_T *eap) return; } if (!eap->skip) - fp = find_func(name, is_global, NULL); + fp = find_func(name, is_global); vim_free(name); if (!eap->skip) @@ -4998,7 +4998,7 @@ func_unref(char_u *name) if (name == NULL || !func_name_refcount(name)) return; - fp = find_func(name, FALSE, NULL); + fp = find_func(name, FALSE); if (fp == NULL && numbered_function(name)) { #ifdef EXITFREE @@ -5039,7 +5039,7 @@ func_ref(char_u *name) if (name == NULL || !func_name_refcount(name)) return; - fp = find_func(name, FALSE, NULL); + fp = find_func(name, FALSE); if (fp != NULL) ++fp->uf_refcount; else if (numbered_function(name)) @@ -5534,7 +5534,7 @@ make_partial(dict_T *selfdict_in, typval_T *rettv) : rettv->vval.v_partial->pt_name; // Translate "s:func" to the stored function name. fname = fname_trans_sid(fname, fname_buf, &tofree, &error); - fp = find_func(fname, FALSE, NULL); + fp = find_func(fname, FALSE); vim_free(tofree); } @@ -5953,7 +5953,7 @@ set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID) if (fp_in == NULL) { fname = fname_trans_sid(name, fname_buf, &tofree, &error); - fp = find_func(fname, FALSE, NULL); + fp = find_func(fname, FALSE); } if (fp != NULL) { |