From: Gurusamy Sarathy Date: Sun, 29 Nov 1998 07:06:43 +0000 (+0000) Subject: fix for pat.t failure under USE_THREADS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=127ad2b7f46b3b186ffbada86b1d7dda9ffd2a05;p=p5sagit%2Fp5-mst-13.2.git fix for pat.t failure under USE_THREADS p4raw-id: //depot/perl@2379 --- diff --git a/pp_ctl.c b/pp_ctl.c index a4fabd2..fbfcab5 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -669,12 +669,8 @@ PP(pp_grepstart) ENTER; /* enter outer scope */ SAVETMPS; -#ifdef USE_THREADS - /* SAVE_DEFSV does *not* suffice here */ - save_sptr(&THREADSV(0)); -#else - SAVESPTR(GvSV(PL_defgv)); -#endif /* USE_THREADS */ + /* SAVE_DEFSV does *not* suffice here for USE_THREADS */ + SAVESPTR(DEFSV); ENTER; /* enter inner scope */ SAVESPTR(PL_curpm); diff --git a/regexec.c b/regexec.c index 770fca6..4879706 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)