/* {{{ sxe_object_dtor()
*/
-static void sxe_object_dtor(void *object TSRMLS_DC)
+static void sxe_object_dtor(zend_object *object TSRMLS_DC)
{
/* dtor required to cleanup iterator related data properly */
php_sxe_object *sxe;
/* {{{ sxe_object_free_storage()
*/
-static void sxe_object_free_storage(void *object TSRMLS_DC)
+static void sxe_object_free_storage(zend_object *object TSRMLS_DC)
{
php_sxe_object *sxe;
zend_hash_destroy(sxe->properties);
FREE_HASHTABLE(sxe->properties);
}
-
- efree(sxe);
}
/* }}} */
intern->fptr_count = NULL;
zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+ object_properties_init(&intern->zo, ce);
while (parent) {
if (parent == sxe_class_entry) {
parent = parent->parent;
inherited = 1;
}
-
+
if (inherited) {
intern->fptr_count = zend_hash_str_find_ptr(&ce->function_table, "count", sizeof("count") - 1);
if (intern->fptr_count->common.scope == parent) {
php_sxe_register_object(php_sxe_object *intern TSRMLS_DC)
{
zend_objects_store_put(&intern->zo TSRMLS_CC);
+ intern->zo.handlers = &sxe_object_handlers;
return &intern->zo;
}
/* }}} */
sxe_class_entry->get_iterator = php_sxe_get_iterator;
sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs;
zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable);
+ sxe_object_handlers.offset = XtOffsetOf(php_sxe_object, zo);
sxe_object_handlers.dtor_obj = sxe_object_dtor;
sxe_object_handlers.free_obj = sxe_object_free_storage;
sxe_object_handlers.clone_obj = sxe_object_clone;