summaryrefslogtreecommitdiff
path: root/regcomp.pl
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 /regcomp.pl
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 'regcomp.pl')
-rw-r--r--regcomp.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/regcomp.pl b/regcomp.pl
index 0c63b94380..fdfa7e6d16 100644
--- a/regcomp.pl
+++ b/regcomp.pl
@@ -91,6 +91,8 @@ sub process_flags {
my $out_string = join ', ', @selected, 0;
$out_string =~ s/(.{1,70},) /$1\n /g;
return $comment . <<"EOP";
+#define REGNODE_\U$varname\E(node) strchr((const char *)PL_${varname}, (node))
+
#ifndef DOINIT
EXTCONST U8 PL_${varname}[];
#else