Skip to content

Commit 8cfa17a

Browse files
committed
toke.c: Remove unnecessary code
If a character matches isSPACE, it must be an ASCII character, and hence its length is 1. No need check for and call UTF8SKIP on it.
1 parent d86f757 commit 8cfa17a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toke.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ S_warn_expect_operator(pTHX_ const char *const what, char *s, I32 pop_oldbufptr)
730730
const char *t= oldbp;
731731
assert(s >= oldbp);
732732
while (t < s && isSPACE(*t)) {
733-
t += UTF ? UTF8SKIP(t) : 1;
733+
t++;
734734
}
735735

736736
sv_catpvf(message,
@@ -5390,7 +5390,7 @@ yyl_dollar(pTHX_ char *s)
53905390

53915391
while ( t < PL_bufend ) {
53925392
if (isSPACE(*t)) {
5393-
do { t += UTF ? UTF8SKIP(t) : 1; } while (t < PL_bufend && isSPACE(*t));
5393+
do { t++; } while (t < PL_bufend && isSPACE(*t));
53945394
/* consumed one or more space chars */
53955395
} else if (*t == '$' || *t == '@') {
53965396
/* could be more than one '$' like $$ref or @$ref */

0 commit comments

Comments
 (0)