From 8dc3eca49ba4203fb28ae4d70f3bfac35442199a Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Mon, 24 Apr 2017 03:39:48 -0700 Subject: api/dispatch: Mark generated functions table readonly (#6576) --- src/nvim/eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d7feed8bfd..c02d172458 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6009,7 +6009,7 @@ char_u *get_expr_name(expand_T *xp, int idx) /// @param[in] name Name of the function. /// /// Returns pointer to the function definition or NULL if not found. -static VimLFuncDef *find_internal_func(const char *const name) +static const VimLFuncDef *find_internal_func(const char *const name) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL { size_t len = strlen(name); @@ -6378,7 +6378,7 @@ call_func( } } else { // Find the function name in the table, call its implementation. - VimLFuncDef *const fdef = find_internal_func((const char *)fname); + const VimLFuncDef *const fdef = find_internal_func((const char *)fname); if (fdef != NULL) { if (argcount < fdef->min_argc) { error = ERROR_TOOFEW; -- cgit