diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-11 05:00:55 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-11 05:00:55 +0000 |
commit | 0214ae4041a6e53bb2f19e015bac063436f2df70 (patch) | |
tree | 5bf848ff3cd2efe77d3a9cddf52caa86f74375ba /pp_ctl.c | |
parent | 5a929a98cca1fca196d5fd6d9350568e529e8825 (diff) | |
download | perl-0214ae4041a6e53bb2f19e015bac063436f2df70.tar.gz |
compatibility fix: magic non-propagation in foreach implicit localization
p4raw-id: //depot/perl@2854
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1640,8 +1640,12 @@ PP(pp_enteriter) SAVETMPS; #ifdef USE_THREADS - if (PL_op->op_flags & OPf_SPECIAL) - svp = save_threadsv(PL_op->op_targ); /* per-thread variable */ + if (PL_op->op_flags & OPf_SPECIAL) { + dTHR; + svp = &THREADSV(PL_op->op_targ); /* per-thread variable */ + SAVEGENERICSV(*svp); + *svp = NEWSV(0,0); + } else #endif /* USE_THREADS */ if (PL_op->op_targ) { @@ -1649,9 +1653,9 @@ PP(pp_enteriter) SAVESPTR(*svp); } else { - GV *gv = (GV*)POPs; - (void)save_scalar(gv); - svp = &GvSV(gv); /* symbol table variable */ + svp = &GvSV((GV*)POPs); /* symbol table variable */ + SAVEGENERICSV(*svp); + *svp = NEWSV(0,0); } ENTER; |