diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-11-19 13:00:47 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-11-19 17:13:02 -0700 |
commit | a35d759aff667e2ddcde81fae0f6dbaecf27e7b1 (patch) | |
tree | 1aac74583e9354b7083ed2234c8f64d610c40669 /handy.h | |
parent | 252810d00e9eadb69251e8aa6b3f673d031b7a44 (diff) | |
download | perl-a35d759aff667e2ddcde81fae0f6dbaecf27e7b1.tar.gz |
Refactor is_CNTRL_utf8(), is_utf8_cntrl()
All controls will always be in the Latin1 range by Unicode's stability
policy. This means that we don't have to call is_utf8_cntrl() when the
input to the is_CNTRL_utf8() macro is above Latin1; we can just fail.
And that means that Perl_is_utf8_cntrl() can just use the macro.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1008,7 +1008,7 @@ EXTCONST U32 PL_charclass[]; /* Because ASCII is invariant under utf8, the non-utf8 macro works */ #define isASCII_utf8(p) isASCII(*p) -#define isCNTRL_utf8(p) _generic_utf8(_CC_CNTRL, is_utf8_cntrl, p) +#define isCNTRL_utf8(p) _generic_utf8_utf8(_CC_CNTRL, p, 0) #define isGRAPH_utf8(p) _generic_utf8(_CC_GRAPH, is_utf8_graph, p) #define isPRINT_utf8(p) _generic_utf8(_CC_PRINT, is_utf8_print, p) #define isPUNCT_utf8(p) _generic_utf8(_CC_PUNCT, is_utf8_punct, p) |