From: Nicholas Clark <nick@ccl4.org>
Date: Wed, 5 Apr 2006 20:19:34 +0000 (+0000)
Subject: Perl_save_alloc can use the new(er) SSGROW rather than looping.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1bb4c83566b57946d55795ecb4df42c7692478c2;p=p5sagit%2Fp5-mst-13.2.git

Perl_save_alloc can use the new(er) SSGROW rather than looping.

p4raw-id: //depot/perl@27726
---

diff --git a/scope.c b/scope.c
index 0070f63..fcdf86f 100644
--- a/scope.c
+++ b/scope.c
@@ -590,9 +590,7 @@ Perl_save_alloc(pTHX_ I32 size, I32 pad)
 				- (char*)PL_savestack);
     register const I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
 
-    /* SSCHECK may not be good enough */
-    while (PL_savestack_ix + elems + 2 > PL_savestack_max)
-	savestack_grow();
+    SSGROW(elems + 2);
 
     PL_savestack_ix += elems;
     SSPUSHINT(elems);