summaryrefslogtreecommitdiff
path: root/l1_char_class_tab.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-05-20 07:55:51 -0600
committerKarl Williamson <public@khwilliamson.com>2012-05-22 08:24:21 -0600
commitc2da0b36ccf7393a329af732fac4153ddf6ab42e (patch)
tree59592eed7490ff80600fbe7eb7171af58487ed0d /l1_char_class_tab.h
parenta027039367d8b0d7e425d682b287cef406d072e2 (diff)
downloadperl-c2da0b36ccf7393a329af732fac4153ddf6ab42e.tar.gz
handy.h: New defn of isOCTAL_A() to free up bit
The new definition is likely slightly faster, as it replaces an array lookup with a mask. Comments are also added, listing the other possible candidates for this treatment, though the speed differential is unclear as they would also add an extra test. A U32 is used to store the information about the various properties for a character. This frees up one bit of that for future other use.
Diffstat (limited to 'l1_char_class_tab.h')
-rw-r--r--l1_char_class_tab.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/l1_char_class_tab.h b/l1_char_class_tab.h
index 3698d95e02..28df339fe9 100644
--- a/l1_char_class_tab.h
+++ b/l1_char_class_tab.h
@@ -53,14 +53,14 @@
/* U+2D '-' */ _CC_CHARNAME_CONT|_CC_GRAPH_A|_CC_GRAPH_L1|_CC_PRINT_A|_CC_PRINT_L1|_CC_PUNCT_A|_CC_PUNCT_L1|_CC_QUOTEMETA,
/* U+2E '.' */ _CC_GRAPH_A|_CC_GRAPH_L1|_CC_PRINT_A|_CC_PRINT_L1|_CC_PUNCT_A|_CC_PUNCT_L1|_CC_QUOTEMETA,
/* U+2F '/' */ _CC_GRAPH_A|_CC_GRAPH_L1|_CC_PRINT_A|_CC_PRINT_L1|_CC_PUNCT_A|_CC_PUNCT_L1|_CC_QUOTEMETA,
-/* U+30 '0' */ _CC_ALNUMC_A|_CC_ALNUMC_L1|_CC_CHARNAME_CONT|_CC_DIGIT_A|_CC_GRAPH_A|_CC_GRAPH_L1|_CC_OCTAL_A|_CC_PRINT_A|_CC_PRINT_L1|_CC_WORDCHAR_A|_CC_WORDCHAR_L1|_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