From: Doug MacEachern Date: Sun, 25 Jun 2000 11:16:08 +0000 (-0700) Subject: avoid mg_ptr in '*' magic X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1879d25aef81871d71ed517b9c4c353431b5fc6e;p=p5sagit%2Fp5-mst-13.2.git avoid mg_ptr in '*' magic Message-ID: p4raw-id: //depot/cfgperl@6244 --- diff --git a/gv.c b/gv.c index 1c3a953..e24fc45 100644 --- a/gv.c +++ b/gv.c @@ -106,7 +106,7 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : ""; GvCVGEN(gv) = 0; GvEGV(gv) = gv; - sv_magic((SV*)gv, (SV*)gv, '*', name, len); + sv_magic((SV*)gv, (SV*)gv, '*', Nullch, 0); GvSTASH(gv) = (HV*)SvREFCNT_inc(stash); GvNAME(gv) = savepvn(name, len); GvNAMELEN(gv) = len; diff --git a/sv.c b/sv.c index 3254cfb..a9303d0 100644 --- a/sv.c +++ b/sv.c @@ -2561,7 +2561,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) char *name = GvNAME(sstr); STRLEN len = GvNAMELEN(sstr); sv_upgrade(dstr, SVt_PVGV); - sv_magic(dstr, dstr, '*', name, len); + sv_magic(dstr, dstr, '*', Nullch, 0); GvSTASH(dstr) = (HV*)SvREFCNT_inc(GvSTASH(sstr)); GvNAME(dstr) = savepvn(name, len); GvNAMELEN(dstr) = len; diff --git a/t/lib/peek.t b/t/lib/peek.t index 255512f..86fd74a 100644 --- a/t/lib/peek.t +++ b/t/lib/peek.t @@ -285,8 +285,6 @@ do_test(17, MG_VIRTUAL = &PL_vtbl_glob MG_TYPE = \'\\*\' MG_OBJ = $ADDR - MG_LEN = 1 - MG_PTR = $ADDR "a" NAME = "a" NAMELEN = 1 GvSTASH = $ADDR\\t"main"