heap->dtor = dtor;
heap->ctor = ctor;
heap->cmp = cmp;
- heap->elements = (void **) safe_emalloc(sizeof(spl_ptr_heap_element), PTR_HEAP_BLOCK_SIZE, 0);
+ heap->elements = safe_emalloc(sizeof(spl_ptr_heap_element), PTR_HEAP_BLOCK_SIZE, 0);
heap->max_size = PTR_HEAP_BLOCK_SIZE;
heap->count = 0;
heap->flags = 0;
heap->count = from->count;
heap->flags = from->flags;
- heap->elements = (void **) safe_emalloc(sizeof(spl_ptr_heap_element),from->max_size,0);
+ heap->elements = safe_emalloc(sizeof(spl_ptr_heap_element),from->max_size,0);
memcpy(heap->elements, from->elements, sizeof(spl_ptr_heap_element)*from->max_size);
for (i=0; i < heap->count; ++i) {
int inherited = 0;
intern = ecalloc(1, sizeof(spl_heap_object));
+ *obj = intern;
ALLOC_INIT_ZVAL(intern->retval);
zend_object_std_init(&intern->std, class_type TSRMLS_CC);