diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-12 19:06:47 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-22 11:11:27 -0700 |
commit | b44daeeb190231d5713adfe3407398da836d42e5 (patch) | |
tree | fe1f1cb866160ce7c65da96504a59677a636d539 /handy.h | |
parent | bd53f4624016a44f7c3ebcb22c88fd1d750d86c7 (diff) | |
download | perl-b44daeeb190231d5713adfe3407398da836d42e5.tar.gz |
regcomp.c: Use table look-up instead of individual strings.
This changes to get the name for the character class's Unicode property
via table lookup. This is in preparation for making most of the cases
in this switch identical, so they can be collapsed.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -802,13 +802,17 @@ typedef enum { #define POSIX_SWASH_COUNT _FIRST_NON_SWASH_CC -#if defined(PERL_IN_UTF8_C) +#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) # if _CC_WORDCHAR != 0 || _CC_DIGIT != 1 || _CC_ALPHA != 2 || _CC_LOWER != 3 \ || _CC_UPPER != 4 || _CC_PUNCT != 5 || _CC_PRINT != 6 \ || _CC_ALPHANUMERIC != 7 || _CC_GRAPH != 8 #error Need to adjust order of swash_property_names[] # endif +/* This is declared static in each of the few files that this is #defined for + * to keep them from being publicly accessible. Hence there is a small amount + * of wasted space */ + static const char* const swash_property_names[] = { "XPosixWord", "XPosixDigit", |