summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-08-08 15:01:48 +0100
committerNicholas Clark <nick@ccl4.org>2009-08-08 17:54:36 +0100
commit85dca89a8f321bc581a3d365d95ab0c56368ed78 (patch)
treeca2336c2dad9d00e09d0201a98a2bb4107890f3f /mathoms.c
parentd5713896ecd1399c9c6c4076514a33eb2880d8c3 (diff)
downloadperl-85dca89a8f321bc581a3d365d95ab0c56368ed78.tar.gz
Perl_newIO() can become a mathom by making newIO() a wrapper around newSV_type()
and tweaking Perl_sv_upgrade().
Diffstat (limited to 'mathoms.c')
-rw-r--r--mathoms.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mathoms.c b/mathoms.c
index 5ae5d2daf4..012ccc2307 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -76,6 +76,7 @@ PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...);
PERL_CALLCONV int Perl_magic_setglob(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV AV * Perl_newAV(pTHX);
PERL_CALLCONV HV * Perl_newHV(pTHX);
+PERL_CALLCONV IO * Perl_newIO(pTHX);
/* ref() is now a macro using Perl_doref;
* this version provided for binary compatibility only.
@@ -1499,6 +1500,12 @@ Perl_gv_HVadd(pTHX_ register GV *gv)
return gv_HVadd(gv);
}
+IO *
+Perl_newIO(pTHX)
+{
+ return MUTABLE_IO(newSV_type(SVt_PVIO));
+}
+
#endif /* NO_MATHOMS */
/*