diff options
author | Alex Vandiver <alex@chmrr.net> | 2015-03-22 23:08:24 -0400 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-03-27 12:46:47 -0700 |
commit | 8ce2ba821761a7ada1e1def512c0374977759cf7 (patch) | |
tree | 7689e4e1f7719724a5aeaa4857780b91b4b4a216 /toke.c | |
parent | 6e59c8626d31f697a2b7b36cf8a200b36d93eac2 (diff) | |
download | perl-8ce2ba821761a7ada1e1def512c0374977759cf7.tar.gz |
Fix "...without parentheses is ambuguous" warning for UTF-8 function names
While isWORDCHAR_lazy_if is UTF-8 aware, checking advanced byte-by-byte.
This lead to errors of the form:
Passing malformed UTF-8 to "XPosixWord" is deprecated
Malformed UTF-8 character (unexpected continuation byte 0x9d, with
no preceding start byte)
Warning: Use of "�" without parentheses is ambiguous
Use UTF8SKIP to advance character-by-character, not byte-by-byte.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1841,7 +1841,7 @@ S_check_uni(pTHX) PL_last_uni++; s = PL_last_uni; while (isWORDCHAR_lazy_if(s,UTF) || *s == '-') - s++; + s += UTF ? UTF8SKIP(s) : 1; if ((t = strchr(s, '(')) && t < PL_bufptr) return; |