[svn:ponie] r350 - trunk/perl
[email protected] 29 Aug 2005 15:14:38 -0000
| Newsgroups | perl.ponie.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: nicholas
Date: Mon Aug 29 08:14:37 2005
New Revision: 350
Modified:
trunk/perl/gv.c
Log:
Merge change 25329 from blead:
No need to manually set the reference count of a new IO to 1.
Modified: trunk/perl/gv.c
==============================================================================
--- trunk/perl/gv.c (original)
+++ trunk/perl/gv.c Mon Aug 29 08:14:37 2005
@@ -1182,7 +1182,10 @@ Perl_newIO(pTHX)
io = (IO*)NEWSV(0,0);
sv_upgrade((SV *)io,SVt_PVIO);
- SvREFCNT_set(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 */