summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-09-24 22:27:57 +0000
committerPierre Joye <pajoye@php.net>2006-09-24 22:27:57 +0000
commit85985ad895a7daf88ae7a14667a5ee64af941661 (patch)
treeae16a393dbe6b878015d4ed857e2a3bd42138064 /ext/zip/php_zip.c
parente55036a346c3bf60a79f106ce8cce2283299b5cb (diff)
downloadphp-git-85985ad895a7daf88ae7a14667a5ee64af941661.tar.gz
- #38943, properties in extended class cannot be set
- use zend_object_std_init instead of a manual initialisation
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 279bac2858..73dbad9e37 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -526,7 +526,6 @@ PHP_ZIP_API zend_object_value php_zip_object_new(zend_class_entry *class_type TS
intern = emalloc(sizeof(ze_zip_object));
memset(&intern->zo, 0, sizeof(zend_object));
- intern->zo.ce = class_type;
intern->za = NULL;
intern->buffers = NULL;
@@ -534,8 +533,7 @@ PHP_ZIP_API zend_object_value php_zip_object_new(zend_class_entry *class_type TS
intern->buffers_cnt = 0;
intern->prop_handler = &zip_prop_handlers;
- ALLOC_HASHTABLE(intern->zo.properties);
- zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,
(void *) &tmp, sizeof(zval *));
@@ -1895,7 +1893,6 @@ PHP_MINIT_FUNCTION(zip)
memcpy(&zip_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
zip_object_handlers.clone_obj = NULL;
zip_object_handlers.get_property_ptr_ptr = php_zip_get_property_ptr_ptr;
- zip_object_handlers.write_property = NULL;
zip_object_handlers.get_properties = php_zip_get_properties;
zip_object_handlers.read_property = php_zip_read_property;