break;
}
- //???if (intern->it) {
- //zend_iterator_dtor(intern->it TSRMLS_CC);
- //}
+ if (intern->it) {
+ //????zend_iterator_dtor(&intern->it->intern);
+ }
efree(intern);
} /* }}} */
zval *object = &iterator->intern.data;
zval_ptr_dtor(object);
}
- efree(iter);
+ efree(iterator);
/* Otherwise we were called from the owning object free storage handler as
* it sets
* iterator->intern.data to NULL.
ZVAL_UNDEF(&iterator->current);
}
}
+ efree(iter);
}
/* }}} */
{
REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, spl_SplFileInfo_functions);
memcpy(&spl_filesystem_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone;
- spl_filesystem_object_handlers.cast_object = spl_filesystem_object_cast;
+ spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone;
+ spl_filesystem_object_handlers.cast_object = spl_filesystem_object_cast;
spl_filesystem_object_handlers.get_debug_info = spl_filesystem_object_get_debug_info;
spl_filesystem_object_handlers.dtor_obj = zend_objects_destroy_object;
spl_filesystem_object_handlers.free_obj = spl_filesystem_object_free_storage;
static inline spl_filesystem_iterator* spl_filesystem_object_to_iterator(spl_filesystem_object *obj TSRMLS_DC)
{
- if (obj->it) {
- zend_iterator_dtor(&obj->it->intern TSRMLS_CC);
- }
-
obj->it = ecalloc(1, sizeof(spl_filesystem_iterator));
obj->it->object = (void *)obj;
zend_iterator_init(&obj->it->intern TSRMLS_CC);