summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2007-01-01 21:16:13 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-04 15:33:16 +0000
commitbe2597dfdde55c276ac6c4b68dadc448c601d0cc (patch)
treeaef6abfecbcea9a7241e50ad3f55ff3d733ebb35 /perlio.c
parent6c9570dc5de7137a22f5d4e76431529d4f7342b7 (diff)
downloadperl-be2597dfdde55c276ac6c4b68dadc448c601d0cc.tar.gz
4th patch from:
Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Introduce an SVfARG() macro for %SVf (%-p here) arguments to perl's printf p4raw-id: //depot/perl@29687
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/perlio.c b/perlio.c
index 17e1ee34fc..ed81598402 100644
--- a/perlio.c
+++ b/perlio.c
@@ -819,7 +819,8 @@ perlio_mg_set(pTHX_ SV *sv, MAGIC *mg)
IO * const io = GvIOn((GV *) SvRV(sv));
PerlIO * const ifp = IoIFP(io);
PerlIO * const ofp = IoOFP(io);
- Perl_warn(aTHX_ "set %" SVf " %p %p %p", (void*)sv, (void*)io, (void*)ifp, (void*)ofp);
+ Perl_warn(aTHX_ "set %" SVf " %p %p %p",
+ SVfARG(sv), (void*)io, (void*)ifp, (void*)ofp);
}
return 0;
}
@@ -831,7 +832,8 @@ perlio_mg_get(pTHX_ SV *sv, MAGIC *mg)
IO * const io = GvIOn((GV *) SvRV(sv));
PerlIO * const ifp = IoIFP(io);
PerlIO * const ofp = IoOFP(io);
- Perl_warn(aTHX_ "get %" SVf " %p %p %p", (void*)sv, (void*)io, (void*)ifp, (void*)ofp);
+ Perl_warn(aTHX_ "get %" SVf " %p %p %p",
+ SVfARG(sv), (void*)io, (void*)ifp, (void*)ofp);
}
return 0;
}
@@ -839,14 +841,14 @@ perlio_mg_get(pTHX_ SV *sv, MAGIC *mg)
static int
perlio_mg_clear(pTHX_ SV *sv, MAGIC *mg)
{
- Perl_warn(aTHX_ "clear %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "clear %" SVf, SVfARG(sv));
return 0;
}
static int
perlio_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
- Perl_warn(aTHX_ "free %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "free %" SVf, SVfARG(sv));
return 0;
}
@@ -871,7 +873,7 @@ XS(XS_io_MODIFY_SCALAR_ATTRIBUTES)
mg = mg_find(sv, PERL_MAGIC_ext);
mg->mg_virtual = &perlio_vtab;
mg_magical(sv);
- Perl_warn(aTHX_ "attrib %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "attrib %" SVf, SVfARG(sv));
for (i = 2; i < items; i++) {
STRLEN len;
const char * const name = SvPV_const(ST(i), len);