diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-09-24 13:23:21 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-10-01 09:58:08 -0600 |
commit | 7b952154426e53253db1065e8e73307cafb4c28b (patch) | |
tree | 961df07252889efbbd02fc2dc53cfbfec06aad78 /handy.h | |
parent | a34094a9f21d9970be58b6482fe6e3245019558e (diff) | |
download | perl-7b952154426e53253db1065e8e73307cafb4c28b.tar.gz |
Don't use swash to find cntrls
Unicode stability policy guarantees that no code points will ever be
added to the control characters beyond those already in it.
All such characters are in the Latin1 range, and so the Perl core
already knows which ones those are, and so there is no need to go out to
disk and create a swash for these.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -867,7 +867,8 @@ EXTCONST U32 PL_charclass[]; #define isUPPER_uni(c) is_uni_upper(c) #define isLOWER_uni(c) is_uni_lower(c) #define isASCII_uni(c) isASCII(c) -#define isCNTRL_uni(c) is_uni_cntrl(c) +/* All controls are in Latin1 */ +#define isCNTRL_uni(c) ((c) < 256 ? isCNTRL_L1(c) : 0) #define isGRAPH_uni(c) is_uni_graph(c) #define isPRINT_uni(c) is_uni_print(c) #define isPUNCT_uni(c) is_uni_punct(c) |