diff options
Diffstat (limited to 'Zend/zend_ptr_stack.c')
-rw-r--r-- | Zend/zend_ptr_stack.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index f1e554e10d..e15979d9fd 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -38,12 +38,8 @@ ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...) va_list ptr; void *elem; - if (stack->top+count > stack->max) { /* we need to allocate more memory */ - stack->max *= 2; - stack->max += count; - stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max))); - stack->top_element = stack->elements+stack->top; - } + ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) + va_start(ptr, count); while (count>0) { elem = va_arg(ptr, void *); |