diff options
author | Father Chrysostomos <sprout@cpan.org> | 2016-07-26 00:47:16 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2016-07-26 01:52:25 -0700 |
commit | 6745174b5616843ee57f0b733bd056bfab42f30f (patch) | |
tree | 9240338ebaecd74be1f5f716565c08c586b82898 /toke.c | |
parent | ef269bf5f55cf5087c6190ddbf34459c60a69622 (diff) | |
download | perl-6745174b5616843ee57f0b733bd056bfab42f30f.tar.gz |
parser.h: Use UV for string delims
We will need to store characters > 255 in here.
Also, cast accordingly in toke.c.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -10020,7 +10020,8 @@ S_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int re /* backslashes can escape the open or closing characters */ if (*s == '\\' && s+1 < PL_bufend) { if (!keep_bracketed_quoted - && ((s[1] == PL_multi_open) || (s[1] == PL_multi_close))) + && ( ((UV)s[1] == PL_multi_open) + || ((UV)s[1] == PL_multi_close) )) { s++; } @@ -10028,9 +10029,9 @@ S_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int re *to++ = *s++; } /* allow nested opens and closes */ - else if (*s == PL_multi_close && --brackets <= 0) + else if ((UV)*s == PL_multi_close && --brackets <= 0) break; - else if (*s == PL_multi_open) + else if ((UV)*s == PL_multi_open) brackets++; else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF) has_utf8 = TRUE; |