*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
+#undef PERL_IN_XSUB_RE
#ifndef PERL_IN_XSUB_RE
#include "re_defs.h"
*/
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
+#undef PERL_IN_XSUB_RE
+#define PERL_IN_XSUB_RE 1
#include "perl.h"
#include "re_defs.h"
+#undef PERL_IN_XSUB_RE
#ifdef PERL_IN_XSUB_RE
# include "re_comp.h"
my %patched_chunks;
my %expected_chunks = (
'regcomp.c' => [
+ 'PERL_IN_XSUB_RE',
're_defs',
'COMP_NODE_HOOK',
'COMP_BEGIN_HOOK',
('COMP_NODE_HOOK') x 3,
],
'regexec.c' => [
- 're_defs',
+ 'PERL_IN_XSUB_RE+re_defs',
'EXEC_NODE_HOOK',
],
);
sub patch_regcomp {
my ($line, $file) = @_;
- if ($line =~ /#\s*include\s+"INTERN\.h"/) {
+ if ($line =~ /#\s*include\s+"perl\.h"/) {
+ push @{$patched_chunks{$file}}, 'PERL_IN_XSUB_RE';
+ return (
+ "#undef PERL_IN_XSUB_RE\n",
+ "#define PERL_IN_XSUB_RE 1\n",
+ $line,
+ "#undef PERL_IN_XSUB_RE\n",
+ );
+ } elsif ($line =~ /#\s*include\s+"INTERN\.h"/) {
push @{$patched_chunks{$file}}, 're_defs';
return "#include \"re_defs.h\"\n";
} elsif ($line =~ /^(\s*)RExC_rxi\s*=\s*ri\s*;\s*$/) {
my ($line, $file) = @_;
if ($line =~ /#\s*include\s+"perl\.h"/) {
- push @{$patched_chunks{$file}}, 're_defs';
- return $line, "#include \"re_defs.h\"\n";
+ push @{$patched_chunks{$file}}, 'PERL_IN_XSUB_RE+re_defs';
+ return (
+ "#undef PERL_IN_XSUB_RE\n",
+ "#define PERL_IN_XSUB_RE 1\n",
+ $line,
+ "#include \"re_defs.h\"\n",
+ "#undef PERL_IN_XSUB_RE\n",
+ );
} elsif ($line =~ /^\s*reenter_switch:\s*$/) {
push @{$patched_chunks{$file}}, 'EXEC_NODE_HOOK';
return "\tREH_CALL_EXEC_NODE_HOOK(rex, scan, reginfo, st);\n", $line;