diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-08-25 13:15:17 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-08-25 13:15:17 +0000 |
commit | 158623e7a4731901256e91f86d41e023422b4150 (patch) | |
tree | 9a4fc6892dfe494713883354e6e555a29c99f290 /gv.c | |
parent | 60099296ceae90f439675352184edd07019ec071 (diff) | |
download | perl-158623e7a4731901256e91f86d41e023422b4150.tar.gz |
No need to manually set the reference count of a new IO to 1.
p4raw-id: //depot/perl@25329
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |