Perl_save_alloc can use the new(er) SSGROW rather than looping.
Nicholas Clark [Wed, 5 Apr 2006 20:19:34 +0000 (20:19 +0000)]
p4raw-id: //depot/perl@27726

scope.c

diff --git a/scope.c b/scope.c
index 0070f63..fcdf86f 100644 (file)
--- 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);