From: Artur Bergman Date: Tue, 10 Jul 2001 19:54:52 +0000 (+0200) Subject: Small fix to pp_gmtime X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a5ff6d915307e9e6c234c058ab1ea235985b6d8;p=p5sagit%2Fp5-mst-13.2.git Small fix to pp_gmtime Message-ID: p4raw-id: //depot/perl@11264 --- diff --git a/pp_sys.c b/pp_sys.c index 29bc12a..5be0b2d 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)));