summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-12 22:29:03 +0200
committerNicholas Clark <nick@ccl4.org>2010-06-13 09:55:44 +0200
commitc33ef3ac654cbe35caea1d36f34c68f0e4a134ba (patch)
tree9bf5e0226317e5a26e4e3f5f5fd011fa516d8d3e /pp_sys.c
parent2addaaf3b439e1adb64bd833a257ff963c73f45a (diff)
downloadperl-c33ef3ac654cbe35caea1d36f34c68f0e4a134ba.tar.gz
For tied file handle calls, use PUSH* when we know that the stack has space.
Previously the code was using XPUSH* in many cases, often to push back values recently popped off the stack.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 8a05c962a9..a39453b700 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -656,7 +656,7 @@ PP(pp_fileno)
&& (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar)))
{
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
PUTBACK;
ENTER_with_name("call_FILENO");
call_method("FILENO", G_SCALAR);
@@ -729,9 +729,9 @@ PP(pp_binmode)
MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
if (mg) {
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
if (discp)
- XPUSHs(discp);
+ PUSHs(discp);
PUTBACK;
ENTER_with_name("call_BINMODE");
call_method("BINMODE", G_SCALAR);
@@ -879,7 +879,7 @@ PP(pp_untie)
CV *cv;
if (gv && isGV(gv) && (cv = GvCV(gv))) {
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(gv), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(gv), mg));
mXPUSHi(SvREFCNT(obj) - 1);
PUTBACK;
ENTER_with_name("call_UNTIE");
@@ -1203,7 +1203,7 @@ PP(pp_getc)
if (mg) {
const I32 gimme = GIMME_V;
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
PUTBACK;
ENTER;
call_method("GETC", gimme);
@@ -2026,7 +2026,7 @@ PP(pp_eof)
if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
/*
* in Perl 5.12 and later, the additional paramter is a bitmask:
* 0 = eof
@@ -2085,7 +2085,7 @@ PP(pp_tell)
MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
if (mg) {
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
PUTBACK;
ENTER;
call_method("TELL", G_SCALAR);
@@ -2126,13 +2126,13 @@ PP(pp_sysseek)
MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
if (mg) {
PUSHMARK(SP);
- XPUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
+ PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
#if LSEEKSIZE > IVSIZE
- mXPUSHn((NV) offset);
+ mPUSHn((NV) offset);
#else
- mXPUSHi(offset);
+ mPUSHi(offset);
#endif
- mXPUSHi(whence);
+ mPUSHi(whence);
PUTBACK;
ENTER;
call_method("SEEK", G_SCALAR);