}
flags &= ~SCF_DO_STCLASS;
}
- else if (strchr((const char*)PL_varies,OP(scan))) {
+ else if (REGNODE_VARIES(OP(scan))) {
I32 mincount, maxcount, minnext, deltanext, fl = 0;
I32 f = flags, pos_before = 0;
regnode * const oscan = scan;
/* Skip open. */
nxt = regnext(nxt);
- if (!strchr((const char*)PL_simple,OP(nxt))
+ if (!REGNODE_SIMPLE(OP(nxt))
&& !(PL_regkind[OP(nxt)] == EXACT
&& STR_LEN(nxt) == 1))
goto nogo;
data->longest = &(data->longest_float);
}
}
- else if (strchr((const char*)PL_simple,OP(scan))) {
+ else if (REGNODE_SIMPLE(OP(scan))) {
int value = 0;
if (flags & SCF_DO_SUBSTR) {
ri->regstclass = trie_op;
}
#endif
- else if (strchr((const char*)PL_simple,OP(first)))
+ else if (REGNODE_SIMPLE(OP(first)))
ri->regstclass = first;
else if (PL_regkind[OP(first)] == BOUND ||
PL_regkind[OP(first)] == NBOUND)
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
#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
/* 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