summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-10-09 17:42:48 -0600
committerFather Chrysostomos <sprout@cpan.org>2010-10-12 13:47:36 -0700
commitd69c231bf7fcba3a2291612fb1b8f0cbf105e4e6 (patch)
tree416a1bc6913130b6918db4ade6bd6a802723abaa /lib
parentaadba0696aa66603df421ad6d176811422849e0f (diff)
downloadperl-d69c231bf7fcba3a2291612fb1b8f0cbf105e4e6.tar.gz
mktables: Convert value_of() to use containing_range()
Diffstat (limited to 'lib')
-rw-r--r--lib/unicore/mktables8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index e58b99685d..de3bd0d403 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -2869,12 +2869,10 @@ sub trace { return main::trace(@_); }
my $codepoint = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $i = $self->contains($codepoint);
- return unless $i;
+ my $range = $self->containing_range($codepoint);
+ return unless defined $range;
- # contains() returns 1 beyond where we should look
- no overloading;
- return $ranges{pack 'J', $self}->[$i-1]->value;
+ return $range->value;
}
sub _search_ranges {