diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-01-14 12:12:50 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-01-14 12:29:15 -0700 |
commit | 2f4622f094c723833b1697727ee432fa8629d5e6 (patch) | |
tree | 5472b991d2aa166a857f2d44e0f9bb9d508ff107 | |
parent | 8f939fab8ea456dff01a2f5c368b664623f9293b (diff) | |
download | perl-2f4622f094c723833b1697727ee432fa8629d5e6.tar.gz |
handy.h: Fix isIDCONT_utf8()
It was handling above-Latin1 code points as IDstarts instead of
continues.
-rw-r--r-- | ext/XS-APItest/t/handy.t | 4 | ||||
-rw-r--r-- | handy.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/XS-APItest/t/handy.t b/ext/XS-APItest/t/handy.t index 0730c109e0..5ecbaa7451 100644 --- a/ext/XS-APItest/t/handy.t +++ b/ext/XS-APItest/t/handy.t @@ -77,6 +77,10 @@ foreach my $name (sort keys %properties) { # This makes sure we are using the Perl definition of idfirst and idcont, # and not the Unicode. There are a few differences. push @code_points, ord "\N{ESTIMATED SYMBOL}" if $name =~ /^id(first|cont)/; + if ($name eq "idcont") { # And some that are continuation but not start + push @code_points, ord("\N{GREEK ANO TELEIA}"), + ord("\N{COMBINING GRAVE ACCENT}"); + } # And finally one non-Unicode code point. push @code_points, 0x110000; # Above Unicode, no prop should match @@ -1268,7 +1268,7 @@ EXTCONST U32 PL_charclass[]; _is_utf8_FOO(_CC_DIGIT, p)) #define isGRAPH_utf8(p) _generic_swash_utf8(_CC_GRAPH, p) #define isIDCONT_utf8(p) _generic_func_utf8(_CC_WORDCHAR, \ - _is_utf8_perl_idstart, p) + _is_utf8_perl_idcont, p) /* To prevent S_scan_word in toke.c from hanging, we have to make sure that * IDFIRST is an alnum. See |