summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 475c225b22..3e428a7700 100644
--- a/gv.c
+++ b/gv.c
@@ -1354,9 +1354,7 @@ Perl_newIO(pTHX)
{
dVAR;
GV *iogv;
- IO * const io = (IO*)newSV(0);
-
- sv_upgrade((SV *)io,SVt_PVIO);
+ IO * const io = (IO*)newSV_type(SVt_PVIO);
/* This used to read SvREFCNT(io) = 1;
It's not clear why the reference count needed an explicit reset. NWC
*/