summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-03-17 13:58:25 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-27 10:30:01 +0100
commite52fc5395a9d11f134b6e4ecacde7782d1af6b26 (patch)
tree15f42a15788ecd48523c3dde2082681e64fe63ea /regnodes.h
parentf9ef50a71935a8e93b4030c12dcd1206ccab71ab (diff)
downloadperl-e52fc5395a9d11f134b6e4ecacde7782d1af6b26.tar.gz
Encapsulate lookups in PL_{varies,simple} within macros REGNODE_{VARIES,SIMPLE}
This allows the implementation of the lookup mechanism to change.
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/regnodes.h b/regnodes.h
index a501416f9a..c9ba1093aa 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -662,6 +662,8 @@ EXTCONST char * const PL_reg_extflags_name[] = {
#endif /* DOINIT */
/* The following have no fixed length. U8 so we can do strchr() on it. */
+#define REGNODE_VARIES(node) strchr((const char *)PL_varies, (node))
+
#ifndef DOINIT
EXTCONST U8 PL_varies[];
#else
@@ -674,6 +676,8 @@ EXTCONST U8 PL_varies[] = {
/* The following always have a length of 1. U8 we can do strchr() on it. */
/* (Note that length 1 means "one character" under UTF8, not "one octet".) */
+#define REGNODE_SIMPLE(node) strchr((const char *)PL_simple, (node))
+
#ifndef DOINIT
EXTCONST U8 PL_simple[];
#else