summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intrpvar.h4
-rw-r--r--makedef.pl1
-rw-r--r--perl.c6
-rw-r--r--perl.h7
-rw-r--r--regexec.c6
5 files changed, 10 insertions, 14 deletions
diff --git a/intrpvar.h b/intrpvar.h
index a8695f52b5..501f0d385b 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -502,9 +502,7 @@ PERLVARI(Idef_layerlist, PerlIO_list_t *,NULL)
PERLVARI(Iencoding, SV*, Nullsv) /* character encoding */
-#ifdef DEBUGGING
-PERLVAR(Idebug_pad, struct perl_debug_pad)
-#endif
+PERLVAR(Idebug_pad, struct perl_debug_pad) /* always needed because of the re extension */
/* New variables must be added to the very end for binary compatibility.
* XSUB.h provides wrapper functions via perlapi.h that make this
diff --git a/makedef.pl b/makedef.pl
index f88f52ed33..40ede54186 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -424,7 +424,6 @@ unless ($define{'DEBUGGING'}) {
Perl_debstackptrs
Perl_sv_peek
PL_block_type
- PL_debug_pad
PL_watchaddr
PL_watchok
)];
diff --git a/perl.c b/perl.c
index 13c7d31581..14fda3533f 100644
--- a/perl.c
+++ b/perl.c
@@ -273,12 +273,6 @@ perl_construct(pTHXx)
New(31337, PL_reentrant_buffer->tmbuff,1, struct tm);
#endif
-#ifdef DEBUGGING
- sv_setpvn(PERL_DEBUG_PAD(0), "", 0);
- sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
- sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
-#endif
-
/* Note that strtab is a rather special HV. Assumptions are made
about not iterating on it, and not adding tie magic to it.
It is properly deallocated in perl_destruct() */
diff --git a/perl.h b/perl.h
index 762ffdaf82..7c51e93f43 100644
--- a/perl.h
+++ b/perl.h
@@ -3114,17 +3114,16 @@ enum { /* pass one of these to get_vtbl */
#define RsPARA(sv) (SvPOK(sv) && ! SvCUR(sv))
#define RsRECORD(sv) (SvROK(sv) && (SvIV(SvRV(sv)) > 0))
-#ifdef DEBUGGING
-/* A struct for keeping various DEBUGGING related stuff
+/* A struct for keeping various DEBUGGING related stuff,
* neatly packed. Currently only scratch variables for
- * constructing debug output are included. */
+ * constructing debug output are included. Needed always,
+ * not just when DEBUGGING, though, because of the re extension. c*/
struct perl_debug_pad {
SV pad[3];
};
#define PERL_DEBUG_PAD(i) &(PL_debug_pad.pad[i])
#define PERL_DEBUG_PAD_ZERO(i) (sv_setpvn(PERL_DEBUG_PAD(i), "", 0), PERL_DEBUG_PAD(i))
-#endif
/* Enable variables which are pointers to functions */
typedef void (CPERLscope(*peep_t))(pTHX_ OP* o);
diff --git a/regexec.c b/regexec.c
index d161c1b03d..efdd8df7ab 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1943,6 +1943,12 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
New(22,PL_reg_start_tmp, PL_reg_start_tmpl, char*);
}
+#ifdef DEBUGGING
+ sv_setpvn(PERL_DEBUG_PAD(0), "", 0);
+ sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
+ sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
+#endif
+
/* XXXX What this code is doing here?!!! There should be no need
to do this again and again, PL_reglastparen should take care of
this! --ilya*/