From 6ed8819822994512c160006bd1204aa11ae3c494 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 May 2019 18:37:44 +0200 Subject: patch 8.1.1319: computing function length name in many places Problem: Computing function length name in many places. Solution: compute name length in call_func(). --- src/eval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index fe8a8efe7..7df545584 100644 --- a/src/eval.c +++ b/src/eval.c @@ -765,7 +765,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv) s = expr->vval.v_string; if (s == NULL || *s == NUL) return FAIL; - if (call_func(s, (int)STRLEN(s), rettv, argc, argv, NULL, + if (call_func(s, -1, rettv, argc, argv, NULL, 0L, 0L, &dummy, TRUE, NULL, NULL) == FAIL) return FAIL; } @@ -776,7 +776,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv) s = partial_name(partial); if (s == NULL || *s == NUL) return FAIL; - if (call_func(s, (int)STRLEN(s), rettv, argc, argv, NULL, + if (call_func(s, -1, rettv, argc, argv, NULL, 0L, 0L, &dummy, TRUE, partial, NULL) == FAIL) return FAIL; } @@ -1088,7 +1088,7 @@ call_vim_function( int ret; rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */ - ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL, + ret = call_func(func, -1, rettv, argc, argv, NULL, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &doesrange, TRUE, NULL, NULL); if (ret == FAIL) @@ -7109,7 +7109,7 @@ handle_subscript( } else s = (char_u *)""; - ret = get_func_tv(s, (int)STRLEN(s), rettv, arg, + ret = get_func_tv(s, -1, rettv, arg, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &len, evaluate, pt, selfdict); -- cgit v1.2.1