develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH] Small fix to pp_gmtime

Thread Previous | Thread Next
From:
Doug MacEachern
Date:
July 10, 2001 11:19
Subject:
Re: [PATCH] Small fix to pp_gmtime
Message ID:
Pine.LNX.4.21.0107101118020.10475-100000@mako.covalent.net
that reminds me, here's similar patch for scalar caller, never made it to
the list (happens to me often), but still applies..

Index: pp_ctl.c
===================================================================
RCS file: /usr/local/cvs_repository/perl-current-mirror/pp_ctl.c,v
retrieving revision 1.1.1.12
diff -u -r1.1.1.12 pp_ctl.c
--- pp_ctl.c	2001/04/09 19:53:30	1.1.1.12
+++ pp_ctl.c	2001/04/11 18:56:47
@@ -1545,7 +1545,7 @@
 
     if (MAXARG)
 	count = POPi;
-    EXTEND(SP, 10);
+
     for (;;) {
 	/* we may be in a higher stacklevel, so dig down deeper */
 	while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
@@ -1554,8 +1554,10 @@
 	    cxix = dopoptosub_at(ccstack, top_si->si_cxix);
 	}
 	if (cxix < 0) {
-	    if (GIMME != G_ARRAY)
+	    if (GIMME != G_ARRAY) {
+		EXTEND(SP, 1);
 		RETPUSHUNDEF;
+            }
 	    RETURN;
 	}
 	if (PL_DBsub && cxix >= 0 &&
@@ -1577,6 +1579,7 @@
 
     stashname = CopSTASHPV(cx->blk_oldcop);
     if (GIMME != G_ARRAY) {
+        EXTEND(SP, 1);
 	if (!stashname)
 	    PUSHs(&PL_sv_undef);
 	else {
@@ -1586,6 +1589,8 @@
 	}
 	RETURN;
     }
+
+    EXTEND(SP, 10);
 
     if (!stashname)
 	PUSHs(&PL_sv_undef);



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About