#endif
+#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
+#else
+# define __restrict__
+#endif
+#define restrict __restrict__
+
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#undef ZEND_PTR_STACK_NUM_ARGS
}
-static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c)
+static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b, zend_alias *restrict c)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
stack->top -= 3;
}
-static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
+static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
typedef unsigned long zend_uintptr_t;
#endif
+#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
+typedef void* __attribute__((__may_alias__)) zend_alias;
+#else
+typedef void* zend_alias;
+#endif
+
typedef unsigned int zend_object_handle;
typedef struct _zend_object_handlers zend_object_handlers;
EG(This) = current_this;
EG(scope) = current_scope;
}
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
zend_ptr_stack_clear_multiple(TSRMLS_C);
}
zval_ptr_dtor(&EX(object));
}
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
EG(This) = current_this;
EG(scope) = current_scope;
}
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
zend_ptr_stack_clear_multiple(TSRMLS_C);
}
zval_ptr_dtor(&EX(object));
}
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {