This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handy.h: Make some macros more time efficient
These macros check if a UTF-8 encoded character is of particular types
for use with locales. Prior to this patch, they called a function to
convert the character to a code point value. This was used as input to
another macro that handles code points. For values above the Latin1
range, that macro calls a function, which converts back to UTF-8 and
calls another function.
This commit changes that to call the UTF-8 function directly for
above-Latin1 code points. No conversion need be done. For Latin1 code
points, it converts, if necessary, to the code point and calls a macro
that handles these directly.
Some of these macros now use a macro instead of a function call for
above-Latin1 code points, as is done in various other places in this
file.