modify get_iterator call for engine change

This commit is contained in:
Rob Richards 2006-02-07 11:48:37 +00:00
parent d2148ac8e5
commit e1e5c3f3b2
2 changed files with 8 additions and 3 deletions

View File

@ -250,7 +250,7 @@ zend_object_iterator_funcs php_dom_iterator_funcs = {
NULL
};
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC)
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
{
dom_object *intern;
dom_nnodemap_object *objmap;
@ -259,8 +259,13 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TS
int ret, curindex = 0;
HashTable *nodeht;
zval **entry;
php_dom_iterator *iterator;
php_dom_iterator *iterator = emalloc(sizeof(php_dom_iterator));
if (by_ref) {
zend_error(E_ERROR, "An iterator cannot be used with foreach by reference");
}
iterator = emalloc(sizeof(php_dom_iterator));
object->refcount++;
iterator->intern.data = (void*)object;

View File

@ -109,7 +109,7 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml
xmlNodePtr create_notation(const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID);
xmlNode *php_dom_libxml_hash_iter(xmlHashTable *ht, int index);
xmlNode *php_dom_libxml_notation_iter(xmlHashTable *ht, int index);
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC);
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry *basece, zend_class_entry *ce TSRMLS_DC);
#define REGISTER_DOM_CLASS(ce, name, parent_ce, funcs, entry) \