summaryrefslogtreecommitdiff
path: root/op_reg_common.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-06-27 13:48:16 -0600
committerKarl Williamson <public@khwilliamson.com>2012-06-29 22:22:42 -0600
commit693fefec6759ebf0a9ec40a0f59346d86831349c (patch)
treed12041ac3714d0ae4c14ce2391f280380f038183 /op_reg_common.h
parent8c1182fda8158a86281b1ea6464176d1c68f2f18 (diff)
downloadperl-693fefec6759ebf0a9ec40a0f59346d86831349c.tar.gz
regcomp.c: Simply some node calculations
For the node types that have differing versions depending on the character set regex modifiers, /d, /l, /u, /a, and /aa, we can use the enum values as offsets from the base node number to derive the correct one. This eliminates a number of tests. Because there is no DIGITU node type, I added placeholders for it (and NDIGITU) to avoid some special casing of it (more important in future commits). We currently have many available node types, so can afford to waste these two.
Diffstat (limited to 'op_reg_common.h')
-rw-r--r--op_reg_common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/op_reg_common.h b/op_reg_common.h
index f35cb7d233..8a45b200b4 100644
--- a/op_reg_common.h
+++ b/op_reg_common.h
@@ -36,7 +36,9 @@
/* The character set for the regex is stored in a field of more than one bit
* using an enum, for reasons of compactness and to ensure that the options are
* mutually exclusive */
-/* Make sure to update ext/re/re.pm when changing this! */
+/* Make sure to update ext/re/re.pm and regcomp.sym (as these are used as
+ * offsets for various node types, like SPACE vs SPACEL, etc) when changing
+ * this! */
typedef enum {
REGEX_DEPENDS_CHARSET = 0,
REGEX_LOCALE_CHARSET,