diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 07:06:43 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 07:06:43 +0000 |
commit | 127ad2b7f46b3b186ffbada86b1d7dda9ffd2a05 (patch) | |
tree | d6eedeaed4c79e42ca431c143e68513ee9d1d99f /regexec.c | |
parent | 338a6d08e163490b2a52a2e64a7488eec1817685 (diff) | |
download | perl-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |