46
46
#define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \
47
47
if (stack->top+count > stack->max) { \
48
48
/* we need to allocate more memory */ \
51
52
stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->persistent); \
52
53
stack->top_element = stack->elements+stack->top; \
55
56
/* Not doing this with a macro because of the loop unrolling in the element assignment.
56
57
Just using a macro for 3 in the body for readability sake. */
57
static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c)
58
static zend_always_inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c)
59
60
#define ZEND_PTR_STACK_NUM_ARGS 3