summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embedvar.h4
-rw-r--r--ext/B/B.xs2
-rw-r--r--intrpvar.h11
-rw-r--r--perl.c2
-rw-r--r--perlapi.h2
5 files changed, 13 insertions, 8 deletions
diff --git a/embedvar.h b/embedvar.h
index f6d6aac4ca..d0a7ec486b 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -368,6 +368,7 @@
#define PL_rsfp (PERL_GET_INTERP->Irsfp)
#define PL_rsfp_filters (PERL_GET_INTERP->Irsfp_filters)
#define PL_runops (PERL_GET_INTERP->Irunops)
+#define PL_savebegin (PERL_GET_INTERP->Isavebegin)
#define PL_sawampersand (PERL_GET_INTERP->Isawampersand)
#define PL_sh_path (PERL_GET_INTERP->Ish_path)
#define PL_sig_pending (PERL_GET_INTERP->Isig_pending)
@@ -653,6 +654,7 @@
#define PL_rsfp (vTHX->Irsfp)
#define PL_rsfp_filters (vTHX->Irsfp_filters)
#define PL_runops (vTHX->Irunops)
+#define PL_savebegin (vTHX->Isavebegin)
#define PL_sawampersand (vTHX->Isawampersand)
#define PL_sh_path (vTHX->Ish_path)
#define PL_sig_pending (vTHX->Isig_pending)
@@ -1076,6 +1078,7 @@
#define PL_rsfp (aTHXo->interp.Irsfp)
#define PL_rsfp_filters (aTHXo->interp.Irsfp_filters)
#define PL_runops (aTHXo->interp.Irunops)
+#define PL_savebegin (aTHXo->interp.Isavebegin)
#define PL_sawampersand (aTHXo->interp.Isawampersand)
#define PL_sh_path (aTHXo->interp.Ish_path)
#define PL_sig_pending (aTHXo->interp.Isig_pending)
@@ -1362,6 +1365,7 @@
#define PL_Irsfp PL_rsfp
#define PL_Irsfp_filters PL_rsfp_filters
#define PL_Irunops PL_runops
+#define PL_Isavebegin PL_savebegin
#define PL_Isawampersand PL_sawampersand
#define PL_Ish_path PL_sh_path
#define PL_Isig_pending PL_sig_pending
diff --git a/ext/B/B.xs b/ext/B/B.xs
index df53d9a229..c3ce0ed43e 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -528,7 +528,7 @@ minus_c()
void
save_BEGINs()
CODE:
- PL_minus_c |= 0x10;
+ PL_savebegin = TRUE;
SV *
cstring(sv)
diff --git a/intrpvar.h b/intrpvar.h
index 4e92302e3d..4fa7374f10 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -476,18 +476,17 @@ PERLVAR(Inumeric_radix_sv, SV *) /* The radix separator if not '.' */
#endif
#if defined(USE_ITHREADS)
-PERLVAR(Iregex_pad, SV**) /* All regex objects */
-PERLVAR(Iregex_padav, AV*) /* All regex objects */
+PERLVAR(Iregex_pad, SV**) /* All regex objects */
+PERLVAR(Iregex_padav, AV*) /* All regex objects */
#ifdef USE_REENTRANT_API
-PERLVAR(Ireentrant_buffer, REBUF*) /* were we store _r buffers */
+PERLVAR(Ireentrant_buffer, REBUF*) /* here we store the _r buffers */
#endif
#endif
+PERLVAR(Isavebegin, bool) /* save BEGINs for compiler */
+
/* New variables must be added to the very end for binary compatibility.
* XSUB.h provides wrapper functions via perlapi.h that make this
* irrelevant, but not all code may be expected to #include XSUB.h. */
-
-
-
diff --git a/perl.c b/perl.c
index 28e8761f03..17fbac4a7f 100644
--- a/perl.c
+++ b/perl.c
@@ -3860,7 +3860,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
while (AvFILL(paramList) >= 0) {
cv = (CV*)av_shift(paramList);
- if ((PL_minus_c & 0x10) && (paramList == PL_beginav)) {
+ if (PL_savebegin && (paramList == PL_beginav)) {
/* save PL_beginav for compiler */
if (! PL_beginav_save)
PL_beginav_save = newAV();
diff --git a/perlapi.h b/perlapi.h
index 71384aca7e..6a5a6c783a 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -472,6 +472,8 @@ START_EXTERN_C
#define PL_rsfp_filters (*Perl_Irsfp_filters_ptr(aTHXo))
#undef PL_runops
#define PL_runops (*Perl_Irunops_ptr(aTHXo))
+#undef PL_savebegin
+#define PL_savebegin (*Perl_Isavebegin_ptr(aTHXo))
#undef PL_sawampersand
#define PL_sawampersand (*Perl_Isawampersand_ptr(aTHXo))
#undef PL_sh_path