X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=gv.c;h=1543059b3fc42ec7862729f31a2f7118da6795d0;hb=5c4138a025eda994be5274f8b136021be9f9119e;hp=27268407e6460e94883549f22a19fb83b9284f89;hpb=46c461b51dd657dd9227e8d230ce0a737a33cb3e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/gv.c b/gv.c index 2726840..1543059 100644 --- a/gv.c +++ b/gv.c @@ -669,7 +669,7 @@ Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 create) GvHV(tmpgv) = newHV(); stash = GvHV(tmpgv); if (!HvNAME_get(stash)) - Perl_hv_name_set(aTHX_ stash, name, namelen, 0); + hv_name_set(stash, name, namelen, 0); return stash; } @@ -759,7 +759,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, stash = GvHV(gv) = newHV(); if (!HvNAME_get(stash)) - Perl_hv_name_set(aTHX_ stash, nambeg, namend - nambeg, 0); + hv_name_set(stash, nambeg, namend - nambeg, 0); } if (*namend == ':') @@ -1222,7 +1222,10 @@ Perl_newIO(pTHX) IO * const io = (IO*)NEWSV(0,0); sv_upgrade((SV *)io,SVt_PVIO); - SvREFCNT(io) = 1; + /* This used to read SvREFCNT(io) = 1; + It's not clear why the reference count needed an explicit reset. NWC + */ + assert (SvREFCNT(io) == 1); SvOBJECT_on(io); /* Clear the stashcache because a new IO could overrule a package name */ hv_clear(PL_stashcache);