summaryrefslogtreecommitdiff
path: root/lib/utf8_heavy.pl
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-06-23 10:14:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-06-23 10:14:43 +0000
commit075d4edd61a9648945541c8a76d8c03d4588400b (patch)
tree016036781878bc1809fe9dc6af234d420d401767 /lib/utf8_heavy.pl
parent60a1aa196c6751722bae1e1ee83a99d0d965146d (diff)
downloadperl-075d4edd61a9648945541c8a76d8c03d4588400b.tar.gz
Tels' patch to defer overloading of hex and oct,
to avoid magic leaking and smoke failures under utf-8 locales p4raw-id: //depot/perl@31450
Diffstat (limited to 'lib/utf8_heavy.pl')
-rw-r--r--lib/utf8_heavy.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index c7bf527b1f..b6b6b6e215 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -213,7 +213,7 @@ sub SWASHNEW {
$list = join '',
map { $_->[1] }
sort { $a->[0] <=> $b->[0] }
- map { /^([0-9a-fA-F]+)/; [ hex($1), $_ ] }
+ map { /^([0-9a-fA-F]+)/; [ CORE::hex($1), $_ ] }
grep { /^([0-9a-fA-F]+)/ and not $seen{$1}++ } @tmp; # XXX doesn't do ranges right
}
@@ -225,9 +225,9 @@ sub SWASHNEW {
if ($minbits != 1 && $minbits < 32) { # not binary property
my $top = 0;
while ($list =~ /^([0-9a-fA-F]+)(?:[\t]([0-9a-fA-F]+)?)(?:[ \t]([0-9a-fA-F]+))?/mg) {
- my $min = hex $1;
- my $max = defined $2 ? hex $2 : $min;
- my $val = defined $3 ? hex $3 : 0;
+ my $min = CORE::hex $1;
+ my $max = defined $2 ? CORE::hex $2 : $min;
+ my $val = defined $3 ? CORE::hex $3 : 0;
$val += $max - $min if defined $3;
$top = $val if $val > $top;
}