summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XSUB.h4
-rw-r--r--ext/Filter/Util/Call/Call.pm2
-rw-r--r--ext/Filter/Util/Call/Call.xs4
-rw-r--r--perl.h8
-rw-r--r--pp_ctl.c6
-rw-r--r--pp_hot.c2
-rw-r--r--regexec.c2
7 files changed, 16 insertions, 12 deletions
diff --git a/XSUB.h b/XSUB.h
index 46e9c292c0..2d95b1e702 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -364,10 +364,10 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
SAVETMPS ; \
SAVEINT(db->filtering) ; \
db->filtering = TRUE ; \
- SAVESPTR(DEFSV) ; \
+ SAVE_DEFSV ; \
if (name[7] == 's') \
arg = newSVsv(arg); \
- DEFSV = arg ; \
+ DEFSV_set(arg) ; \
SvTEMP_off(arg) ; \
PUSHMARK(SP) ; \
PUTBACK ; \
diff --git a/ext/Filter/Util/Call/Call.pm b/ext/Filter/Util/Call/Call.pm
index 6522edcc86..46f0b8122a 100644
--- a/ext/Filter/Util/Call/Call.pm
+++ b/ext/Filter/Util/Call/Call.pm
@@ -18,7 +18,7 @@ use vars qw($VERSION @ISA @EXPORT) ;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ;
-$VERSION = "1.07_01" ;
+$VERSION = "1.07_02" ;
sub filter_read_exact($)
{
diff --git a/ext/Filter/Util/Call/Call.xs b/ext/Filter/Util/Call/Call.xs
index 2df81d8ee4..2380b146dc 100644
--- a/ext/Filter/Util/Call/Call.xs
+++ b/ext/Filter/Util/Call/Call.xs
@@ -125,9 +125,9 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen)
SAVEINT(current_idx) ; /* save current idx */
current_idx = idx ;
- SAVESPTR(DEFSV) ; /* save $_ */
+ SAVE_DEFSV ; /* save $_ */
/* make $_ use our buffer */
- DEFSV = newSVpv("", 0) ;
+ DEFSV_set(newSVpv("", 0)) ;
PUSHMARK(sp) ;
diff --git a/perl.h b/perl.h
index e07416e9a4..526155b5b7 100644
--- a/perl.h
+++ b/perl.h
@@ -1306,8 +1306,12 @@ EXTERN_C char *crypt(const char *, const char *);
#endif
#define ERRSV GvSV(PL_errgv)
-/* FIXME? Change the assignments to PL_defgv to instantiate GvSV? */
-#define DEFSV GvSVn(PL_defgv)
+#ifdef PERL_CORE
+# define DEFSV (0 + GvSVn(PL_defgv))
+#else
+# define DEFSV GvSVn(PL_defgv)
+#endif
+#define DEFSV_set(sv) (GvSV(PL_defgv) = (sv))
#define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
#define ERRHV GvHV(PL_errgv) /* XXX unused, here for compatibility */
diff --git a/pp_ctl.c b/pp_ctl.c
index 08b14c6bc3..3ef7e3210b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -988,7 +988,7 @@ PP(pp_grepstart)
if (PL_op->op_private & OPpGREP_LEX)
PAD_SVl(PL_op->op_targ) = src;
else
- DEFSV = src;
+ DEFSV_set(src);
PUTBACK;
if (PL_op->op_type == OP_MAPSTART)
@@ -1099,7 +1099,7 @@ PP(pp_mapwhile)
if (PL_op->op_private & OPpGREP_LEX)
PAD_SVl(PL_op->op_targ) = src;
else
- DEFSV = src;
+ DEFSV_set(src);
RETURNOP(cLOGOP->op_other);
}
@@ -4822,7 +4822,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
SAVETMPS;
EXTEND(SP, 2);
- DEFSV = upstream;
+ DEFSV_set(upstream);
PUSHMARK(SP);
mPUSHi(0);
if (filter_state) {
diff --git a/pp_hot.c b/pp_hot.c
index eeedc5b375..6450e25f35 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2424,7 +2424,7 @@ PP(pp_grepwhile)
if (PL_op->op_private & OPpGREP_LEX)
PAD_SVl(PL_op->op_targ) = src;
else
- DEFSV = src;
+ DEFSV_set(src);
RETURNOP(cLOGOP->op_other);
}
diff --git a/regexec.c b/regexec.c
index 025d1592f4..6c0923fc8b 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2250,7 +2250,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
/* Make $_ available to executed code. */
if (reginfo->sv != DEFSV) {
SAVE_DEFSV;
- DEFSV = reginfo->sv;
+ DEFSV_set(reginfo->sv);
}
if (!(SvTYPE(reginfo->sv) >= SVt_PVMG && SvMAGIC(reginfo->sv)