diff options
-rw-r--r-- | charclass_invlists.h | 2 | ||||
-rw-r--r-- | lib/Unicode/UCD.pm | 12 | ||||
-rw-r--r-- | lib/Unicode/UCD.t | 8 | ||||
-rw-r--r-- | regcharclass.h | 2 |
4 files changed, 14 insertions, 10 deletions
diff --git a/charclass_invlists.h b/charclass_invlists.h index ec7f79603f..a7f505649e 100644 --- a/charclass_invlists.h +++ b/charclass_invlists.h @@ -97410,7 +97410,7 @@ static const U8 WB_table[24][24] = { #endif /* defined(PERL_IN_REGEXEC_C) */ /* Generated from: - * 59e717586b720a821ee0d7397679d5322e38b49f6fb7840545aedf669c733b70 lib/Unicode/UCD.pm + * 3d90f60be77f44dea803ca765001cbcbe92d7e0044c7ebbbd120893410ce7bd7 lib/Unicode/UCD.pm * ff4404ec64f308bdf7714c50f9fdf0d1d0bf3c34db4d0a67e58ef0c6f88e818f lib/unicore/ArabicShaping.txt * 292171a0a1c13d7e581e8781eb4cdf248243b1ab267354a63c7a14429dea2740 lib/unicore/BidiBrackets.txt * 8f2695cc42989a79a715ab0d2892bd0c998759180cfdfb998674447f48231940 lib/unicore/BidiMirroring.txt diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index 4939677fcc..42d376eff6 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -5,7 +5,7 @@ use warnings; no warnings 'surrogate'; # surrogates can be inputs to this use charnames (); -our $VERSION = '0.68'; +our $VERSION = '0.69'; require Exporter; @@ -2444,8 +2444,8 @@ sub prop_value_aliases ($$) { return ( $list_ref->[0], $list_ref->[0] ); } -# All 1 bits is the largest possible UV. -$Unicode::UCD::MAX_CP = ~0; +# All 1 bits but the top one is the largest possible IV. +$Unicode::UCD::MAX_CP = (~0) >> 1; =pod @@ -2537,11 +2537,7 @@ code points that have the property-value: for (my $i = 0; $i < @invlist; $i += 2) { my $upper = ($i + 1) < @invlist ? $invlist[$i+1] - 1 # In range - : $Unicode::UCD::MAX_CP; # To infinity. You may want - # to stop much much earlier; - # going this high may expose - # perl deficiencies with very - # large numbers. + : $Unicode::UCD::MAX_CP; # To infinity. for my $j ($invlist[$i] .. $upper) { push @full_list, $j; } diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t index 32f01086bc..b3476a68fa 100644 --- a/lib/Unicode/UCD.t +++ b/lib/Unicode/UCD.t @@ -2700,4 +2700,12 @@ if (! ok(@warnings == 0, "No warnings were generated")) { diag(join "\n", "The warnings are:", @warnings); } +# And make sure that the max code point returned actually fits in an IV, which +# currently range iterators are. +my $count = 0; +for my $i ($Unicode::UCD::MAX_CP - 1 .. $Unicode::UCD::MAX_CP) { + $count++; +} +is($count, 2, "MAX_CP isn't too large"); + done_testing(); diff --git a/regcharclass.h b/regcharclass.h index 74134f60b8..e0c947ccb0 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -1854,7 +1854,7 @@ #endif /* PERL_REGCHARCLASS_H_ */ /* Generated from: - * 59e717586b720a821ee0d7397679d5322e38b49f6fb7840545aedf669c733b70 lib/Unicode/UCD.pm + * 3d90f60be77f44dea803ca765001cbcbe92d7e0044c7ebbbd120893410ce7bd7 lib/Unicode/UCD.pm * ff4404ec64f308bdf7714c50f9fdf0d1d0bf3c34db4d0a67e58ef0c6f88e818f lib/unicore/ArabicShaping.txt * 292171a0a1c13d7e581e8781eb4cdf248243b1ab267354a63c7a14429dea2740 lib/unicore/BidiBrackets.txt * 8f2695cc42989a79a715ab0d2892bd0c998759180cfdfb998674447f48231940 lib/unicore/BidiMirroring.txt |