mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.1.0870: too many strlen() calls in eval.c
Problem: too many strlen() calls in eval.c Solution: Refactor eval.c to remove calls to STRLEN() (John Marriott) closes: #16066 Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ba9e1570d2
commit
bd4614f43d
@@ -668,12 +668,14 @@ repeat:
|
||||
str = vim_strnsave(*fnamep, *fnamelen);
|
||||
if (sub != NULL && str != NULL)
|
||||
{
|
||||
size_t slen;
|
||||
|
||||
*usedlen = p + 1 - src;
|
||||
s = do_string_sub(str, pat, sub, NULL, flags);
|
||||
s = do_string_sub(str, *fnamelen, pat, sub, NULL, flags, &slen);
|
||||
if (s != NULL)
|
||||
{
|
||||
*fnamep = s;
|
||||
*fnamelen = (int)STRLEN(s);
|
||||
*fnamelen = slen;
|
||||
vim_free(*bufp);
|
||||
*bufp = s;
|
||||
didit = TRUE;
|
||||
|
Reference in New Issue
Block a user