handy.h: Make some macros more time efficient
authorKarl Williamson <public@khwilliamson.com>
Mon, 3 Dec 2012 03:09:46 +0000 (20:09 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 9 Dec 2012 17:30:00 +0000 (10:30 -0700)
commit9201a572e97a4bd66ccd29bcdf8e55d2ac0595d0
tree78d9223a38ddae13bbbc2c85447ae0b456b0b699
parentfeeab5a94c530ce7c446d29e3616565c85a50a35
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.
handy.h