diff options
author | Andi Gutmans <andi@php.net> | 2001-08-11 18:04:07 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-08-11 18:04:07 +0000 |
commit | 532677e7ac34678d11f8d768fb05dfbd0a9ca8fa (patch) | |
tree | e7ad98d56b25c3424a091287d5931743758098dd /Zend/zend_API.c | |
parent | c0404f46311e5b519dc51697e181bb39ca8d09d2 (diff) | |
download | php-git-532677e7ac34678d11f8d768fb05dfbd0a9ca8fa.tar.gz |
- Fix some places which create objects. The fixes are ugly and will be
revised when things start working well
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 04bb78d8bb..b6a2012e18 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -575,14 +575,11 @@ ZEND_API int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_L class_type->constants_updated = 1; } - arg->value.obj = zend_objects_new(&object); + arg->type = IS_OBJECT; + arg->value.obj = zend_objects_new(&object, class_type); - ALLOC_HASHTABLE_REL(object->properties); - zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - object->ce = class_type; - - arg->type = IS_OBJECT; + return SUCCESS; } |