diff options
author | Marcus Boerger <helly@php.net> | 2003-11-10 22:06:26 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-11-10 22:06:26 +0000 |
commit | bdc339d30d61333edf3ed0c42e717b4523d28461 (patch) | |
tree | 5fd7d1abc82428b4f5a57f983f314f265b020e63 /Zend/zend_iterators.c | |
parent | 7cc93e121b6fca38200a26645d9410167d3e2b06 (diff) | |
download | php-git-bdc339d30d61333edf3ed0c42e717b4523d28461.tar.gz |
Don't use zend_class_entry indirection
Diffstat (limited to 'Zend/zend_iterators.c')
-rwxr-xr-x | Zend/zend_iterators.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 3a47db47c5..7de8116e2d 100755 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -24,11 +24,6 @@ static zend_class_entry zend_iterator_class_entry; -static zend_class_entry *iter_handler_get_ce(zval *object TSRMLS_DC) -{ - return &zend_iterator_class_entry; -} - static zend_object_handlers iterator_object_handlers = { ZEND_OBJECTS_STORE_HANDLERS, NULL, /* prop read */ @@ -46,7 +41,7 @@ static zend_object_handlers iterator_object_handlers = { NULL, /* method get */ NULL, /* call */ NULL, /* get ctor */ - iter_handler_get_ce, + NULL, /* get_ce */ NULL, /* get class name */ NULL, /* compare */ NULL /* cast */ @@ -78,12 +73,9 @@ ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC) ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap( zval *array_ptr, zend_object_iterator **iter TSRMLS_DC) { - zend_class_entry *ce; - switch (Z_TYPE_P(array_ptr)) { case IS_OBJECT: - ce = Z_OBJCE_P(array_ptr); - if (ce == &zend_iterator_class_entry) { + if (Z_OBJ_HT_P(array_ptr) == &iterator_object_handlers) { *iter = (zend_object_iterator *)zend_object_store_get_object(array_ptr TSRMLS_CC); return ZEND_ITER_OBJECT; } |