diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-20 17:36:53 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-20 17:36:53 +0000 |
commit | 65c5011456bf74c702f7584e00961bc2bf3ea4f1 (patch) | |
tree | d29b17605cceff9034a01c16e75a4e3f558e050a | |
parent | cbebf3444d32314df9db7cb3988b6c97da05aa13 (diff) | |
download | perl-65c5011456bf74c702f7584e00961bc2bf3ea4f1.tar.gz |
Integrate pureperl changes #8844,8845,8850 to mainline
(via maintperl #8855).
Fixed %^H scoping bug
Removed GV <-> CV refcount loop
Removed %ENV refcount loop
p4raw-link: @8850 on //depot/maint-5.6/pureperl: bae1eca58b94313e4b7677aa241da9fad57bb363
p4raw-link: @8845 on //depot/maint-5.6/pureperl: 4d40626c12bbdd62acfbbe3be104711e58cec2f7
p4raw-link: @8844 on //depot/maint-5.6/pureperl: ea100fc6cfd2f0e23aceb84ac0e804e3c9c3c9a2
p4raw-id: //depot/perl@8858
p4raw-integrated: from //depot/maint-5.6/perl@8857 'merge in' gv.c
scope.c (@8606..) pp.c (@8635..) op.c (@8758..) perl.c
(@8806..)
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | op.c | 9 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | pp.c | 2 | ||||
-rw-r--r-- | scope.c | 4 |
5 files changed, 7 insertions, 12 deletions
@@ -125,7 +125,7 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) LEAVE; PL_sub_generation++; - CvGV(GvCV(gv)) = (GV*)SvREFCNT_inc(gv); + CvGV(GvCV(gv)) = gv; CvFILE(GvCV(gv)) = CopFILE(PL_curcop); CvSTASH(GvCV(gv)) = PL_curstash; #ifdef USE_THREADS @@ -4155,7 +4155,6 @@ Perl_cv_undef(pTHX_ CV *cv) } SvPOK_off((SV*)cv); /* forget prototype */ CvFLAGS(cv) = 0; - SvREFCNT_dec(CvGV(cv)); CvGV(cv) = Nullgv; SvREFCNT_dec(CvOUTSIDE(cv)); CvOUTSIDE(cv) = Nullcv; @@ -4268,7 +4267,7 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside) CvOWNER(cv) = 0; #endif /* USE_THREADS */ CvFILE(cv) = CvFILE(proto); - CvGV(cv) = (GV*)SvREFCNT_inc(CvGV(proto)); + CvGV(cv) = CvGV(proto); CvSTASH(cv) = CvSTASH(proto); CvROOT(cv) = CvROOT(proto); CvSTART(cv) = CvSTART(proto); @@ -4678,7 +4677,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) PL_sub_generation++; } } - CvGV(cv) = (GV*)SvREFCNT_inc(gv); + CvGV(cv) = gv; CvFILE(cv) = CopFILE(PL_curcop); CvSTASH(cv) = PL_curstash; #ifdef USE_THREADS @@ -4954,7 +4953,7 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename) PL_sub_generation++; } } - CvGV(cv) = (GV*)SvREFCNT_inc(gv); + CvGV(cv) = gv; #ifdef USE_THREADS New(666, CvMUTEXP(cv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(cv)); @@ -5045,7 +5044,7 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) } cv = PL_compcv; GvFORM(gv) = cv; - CvGV(cv) = (GV*)SvREFCNT_inc(gv); + CvGV(cv) = gv; CvFILE(cv) = CopFILE(PL_curcop); for (ix = AvFILLp(PL_comppad); ix > 0; ix--) { @@ -3326,7 +3326,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register HV *hv; GvMULTI_on(PL_envgv); hv = GvHVn(PL_envgv); - hv_magic(hv, PL_envgv, 'E'); + hv_magic(hv, Nullgv, 'E'); #ifdef USE_ENVIRON_ARRAY /* Note that if the supplied env parameter is actually a copy of the global environ then it may now point to free'd memory @@ -834,7 +834,7 @@ PP(pp_undef) case SVt_PVFM: { /* let user-undef'd sub keep its identity */ - GV* gv = (GV*)SvREFCNT_inc(CvGV((CV*)sv)); + GV* gv = CvGV((CV*)sv); cv_undef((CV*)sv); CvGV((CV*)sv) = gv; } @@ -912,10 +912,6 @@ Perl_leave_scope(pTHX_ I32 base) PL_op = (OP*)SSPOPPTR; break; case SAVEt_HINTS: - if (GvHV(PL_hintgv)) { - SvREFCNT_dec((SV*)GvHV(PL_hintgv)); - GvHV(PL_hintgv) = NULL; - } *(I32*)&PL_hints = (I32)SSPOPINT; break; case SAVEt_COMPPAD: |