diff options
author | Andi Gutmans <andi@php.net> | 2002-03-12 19:22:29 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2002-03-12 19:22:29 +0000 |
commit | fb6976e46d6a0e3ce596358f866384e277849bc2 (patch) | |
tree | 36aaa1e3b3c25274b484b7b0b7df2af49b1f3171 /Zend/zend_API.c | |
parent | c8c629b3fcc1e531863b726faac843a3d8dde80d (diff) | |
download | php-git-fb6976e46d6a0e3ce596358f866384e277849bc2.tar.gz |
- Another couple of indirection fixes.
- Make class_entry->refcount be part of the structure and not allocated.
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index d85eafddb5..26ee2ce77d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -212,10 +212,7 @@ static int zend_check_class(zval *obj, zend_class_entry *expected_ce) } for (ce = Z_OBJCE_P(obj); ce != NULL; ce = ce->parent) { - /* - * C'est une UGLY HACK. - */ - if (ce->refcount == expected_ce->refcount) { + if (ce == expected_ce) { return 1; } } @@ -1228,8 +1225,7 @@ ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *orig_c class_entry->type = ZEND_INTERNAL_CLASS; class_entry->parent = NULL; - class_entry->refcount = (int *) malloc(sizeof(int)); - *class_entry->refcount = 1; + class_entry->refcount = 1; class_entry->constants_updated = 0; zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1); zend_hash_init(&class_entry->private_properties, 0, NULL, ZVAL_PTR_DTOR, 1); |