summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-29 07:06:43 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-29 07:06:43 +0000
commit127ad2b7f46b3b186ffbada86b1d7dda9ffd2a05 (patch)
treed6eedeaed4c79e42ca431c143e68513ee9d1d99f /regexec.c
parent338a6d08e163490b2a52a2e64a7488eec1817685 (diff)
downloadperl-127ad2b7f46b3b186ffbada86b1d7dda9ffd2a05.tar.gz
fix for pat.t failure under USE_THREADS
p4raw-id: //depot/perl@2379
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 770fca6170..48797065b3 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1058,9 +1058,10 @@ regtry(regexp *prog, char *startpos)
if (PL_reg_sv) {
/* Make $_ available to executed code. */
- if (PL_reg_sv != GvSV(PL_defgv)) {
- SAVESPTR(GvSV(PL_defgv));
- GvSV(PL_defgv) = PL_reg_sv;
+ if (PL_reg_sv != DEFSV) {
+ /* SAVE_DEFSV does *not* suffice here for USE_THREADS */
+ SAVESPTR(DEFSV);
+ DEFSV = PL_reg_sv;
}
if (!(SvTYPE(PL_reg_sv) >= SVt_PVMG && SvMAGIC(PL_reg_sv)