This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Don't throw away a value and then recalc it
authorKarl Williamson <khw@cpan.org>
Thu, 3 Dec 2015 19:34:57 +0000 (12:34 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 10 Dec 2015 01:55:55 +0000 (18:55 -0700)
commitb999256943f4868aefd090587ad36fc6dc85dc27
treedf6e630e716a103deb48c44bc883fdca142dd2df
parent13cf59ef3a5d7ce9151c3cd89631387ed0f5622d
utf8.c: Don't throw away a value and then recalc it

In half the calls to to_utf8_case(), the code point being looked up is
known.  It is thrown away because the API doesn't pass it, and then
recalculated first thing in to_utf8_case.

Fix this by making a new static function which adds the code point to
the parameter list, and change all calls to use this, leaving the
existing to_utf8_case() as just a wrapper for the new function.
embed.fnc
embed.h
lib/utf8_heavy.pl
proto.h
utf8.c