summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-07-10 21:54:52 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-11 00:27:17 +0000
commit9a5ff6d915307e9e6c234c058ab1ea235985b6d8 (patch)
tree6960102a42fb05fef4bf7e2775dc39f8127607a9 /pp_sys.c
parent41f494d50c746b98d2d03df6bc02ffcaad9938ec (diff)
downloadperl-9a5ff6d915307e9e6c234c058ab1ea235985b6d8.tar.gz
Small fix to pp_gmtime
Message-ID: <B7710E0B.21C5%artur@contiller.se> p4raw-id: //depot/perl@11264
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 29bc12a14e..5be0b2db95 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4323,10 +4323,10 @@ PP(pp_gmtime)
else
tmbuf = gmtime(&when);
- EXTEND(SP, 9);
- EXTEND_MORTAL(9);
if (GIMME != G_ARRAY) {
SV *tsv;
+ EXTEND(SP, 1);
+ EXTEND_MORTAL(1);
if (!tmbuf)
RETPUSHUNDEF;
tsv = Perl_newSVpvf(aTHX_ "%s %s %2d %02d:%02d:%02d %d",
@@ -4340,7 +4340,9 @@ PP(pp_gmtime)
PUSHs(sv_2mortal(tsv));
}
else if (tmbuf) {
- PUSHs(sv_2mortal(newSViv(tmbuf->tm_sec)));
+ EXTEND(SP, 9);
+ EXTEND_MORTAL(9);
+ PUSHs(sv_2mortal(newSViv(tmbuf->tm_sec)));
PUSHs(sv_2mortal(newSViv(tmbuf->tm_min)));
PUSHs(sv_2mortal(newSViv(tmbuf->tm_hour)));
PUSHs(sv_2mortal(newSViv(tmbuf->tm_mday)));