diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-10-09 17:42:48 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-12 13:47:36 -0700 |
commit | d69c231bf7fcba3a2291612fb1b8f0cbf105e4e6 (patch) | |
tree | 416a1bc6913130b6918db4ade6bd6a802723abaa /lib | |
parent | aadba0696aa66603df421ad6d176811422849e0f (diff) | |
download | perl-d69c231bf7fcba3a2291612fb1b8f0cbf105e4e6.tar.gz |
mktables: Convert value_of() to use containing_range()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 8 |
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 { |