cvs: php-src /ext/dom document.c documenttype.c element.c node.c php_dom.c php_dom.h
| From: | Rob Richards | Date: | Mon, 30 Aug 2004 15:07:20 +0000 |
| Subject: | cvs: php-src /ext/dom document.c documenttype.c element.c node.c php_dom.c php_dom.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-28505@lists.php.net to get a copy of this message | ||
rrichards Mon Aug 30 11:07:20 2004 EDT
Modified files:
/php-src/ext/dom document.c documenttype.c element.c node.c
php_dom.c php_dom.h
Log:
remove cloning under ze1_compatibility_mode
- minor BC break but doesnt work right under compat mode anyways
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.58&r2=1.59&ty=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.58 php-src/ext/dom/document.c:1.59 --- php-src/ext/dom/document.c:1.58 Wed Aug 25 04:27:07 2004 +++ php-src/ext/dom/document.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.58 2004/08/25 08:27:07 chregu Exp $ */ +/* $Id: document.c,v 1.59 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1058,7 +1058,7 @@ php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC); namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); + dom_namednode_iter(intern, 0, namednode, NULL, local, NULL TSRMLS_CC); } /* }}} end dom_document_get_elements_by_tag_name */ @@ -1258,7 +1258,7 @@ namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri); + dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri TSRMLS_CC); } /* }}} end dom_document_get_elements_by_tag_name_ns */ http://cvs.php.net/diff.php/php-src/ext/dom/documenttype.c?r1=1.12&r2=1.13&ty=u Index: php-src/ext/dom/documenttype.c diff -u php-src/ext/dom/documenttype.c:1.12 php-src/ext/dom/documenttype.c:1.13 --- php-src/ext/dom/documenttype.c:1.12 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/documenttype.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documenttype.c,v 1.12 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: documenttype.c,v 1.13 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -88,7 +88,7 @@ entityht = (xmlHashTable *) doctypep->entities; intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ENTITY_NODE, intern, entityht, NULL, NULL); + dom_namednode_iter(obj, XML_ENTITY_NODE, intern, entityht, NULL, NULL TSRMLS_CC); return SUCCESS; } @@ -121,7 +121,7 @@ notationht = (xmlHashTable *) doctypep->notations; intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_NOTATION_NODE, intern, notationht, NULL, NULL); + dom_namednode_iter(obj, XML_NOTATION_NODE, intern, notationht, NULL, NULL TSRMLS_CC); return SUCCESS; } http://cvs.php.net/diff.php/php-src/ext/dom/element.c?r1=1.30&r2=1.31&ty=u Index: php-src/ext/dom/element.c diff -u php-src/ext/dom/element.c:1.30 php-src/ext/dom/element.c:1.31 --- php-src/ext/dom/element.c:1.30 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/element.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.30 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: element.c,v 1.31 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -455,7 +455,7 @@ php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC); namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); + dom_namednode_iter(intern, 0, namednode, NULL, local, NULL TSRMLS_CC); } /* }}} end dom_element_get_elements_by_tag_name */ @@ -777,7 +777,7 @@ namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri); + dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri TSRMLS_CC); } /* }}} end dom_element_get_elements_by_tag_name_ns */ http://cvs.php.net/diff.php/php-src/ext/dom/node.c?r1=1.29&r2=1.30&ty=u Index: php-src/ext/dom/node.c diff -u php-src/ext/dom/node.c:1.29 php-src/ext/dom/node.c:1.30 --- php-src/ext/dom/node.c:1.29 Sun Jun 13 06:12:47 2004 +++ php-src/ext/dom/node.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c,v 1.29 2004/06/13 10:12:47 rrichards Exp $ */ +/* $Id: node.c,v 1.30 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -351,7 +351,7 @@ } else { php_dom_create_interator(*retval, DOM_NODELIST TSRMLS_CC); intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); + dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL TSRMLS_CC); } return SUCCESS; @@ -529,7 +529,7 @@ if (nodep->type == XML_ELEMENT_NODE) { php_dom_create_interator(*retval, DOM_NAMEDNODEMAP TSRMLS_CC); intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL); + dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL TSRMLS_CC); } else { ZVAL_NULL(*retval); } http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.62&r2=1.63&ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.62 php-src/ext/dom/php_dom.c:1.63 --- php-src/ext/dom/php_dom.c:1.62 Fri Aug 13 08:32:55 2004 +++ php-src/ext/dom/php_dom.c Mon Aug 30 11:07:20 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.62 2004/08/13 12:32:55 chregu Exp $ */ +/* $Id: php_dom.c,v 1.63 2004/08/30 15:07:20 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -35,6 +35,7 @@ #define PHP_XPTR 2 zend_object_handlers dom_object_handlers; +zend_object_handlers dom_ze1_object_handlers; static HashTable classes; @@ -334,7 +335,7 @@ obj = &EG(objects_store).object_buckets[handle].bucket.obj; if (obj->clone == NULL) { - zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name); + php_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(zobject)->name); } obj->clone(obj->object, &new_object TSRMLS_CC); @@ -347,11 +348,26 @@ return retval; } +zend_object_value dom_objects_ze1_clone_obj(zval *zobject TSRMLS_DC) +{ + php_error(E_ERROR, "Cannot clone object of class %s due to 'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name); + /* Return zobject->value.obj just to satisfy compiler */ + return zobject->value.obj; +} + static zend_function_entry dom_functions[] = { PHP_FE(dom_import_simplexml, NULL) {NULL, NULL, NULL} }; +static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) { + if (EG(ze1_compatibility_mode)) { + return &dom_ze1_object_handlers; + } else { + return &dom_object_handlers; + } +} + zend_module_entry dom_module_entry = { STANDARD_MODULE_HEADER, "dom", @@ -380,6 +396,12 @@ dom_object_handlers.get_property_ptr_ptr = NULL; dom_object_handlers.clone_obj = dom_objects_store_clone_obj; + memcpy(&dom_ze1_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + dom_ze1_object_handlers.read_property = dom_read_property; + dom_ze1_object_handlers.write_property = dom_write_property; + dom_ze1_object_handlers.get_property_ptr_ptr = NULL; + dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj; + zend_hash_init(&classes, 0, NULL, NULL, 1); INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions); @@ -807,7 +829,7 @@ } /* }}} */ -void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns) +void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns TSRMLS_DC) { dom_nnodemap_object *mapptr; zval *baseobj = NULL; @@ -818,7 +840,7 @@ baseobj->type = IS_OBJECT; baseobj->is_ref = 1; baseobj->value.obj.handle = basenode->handle; - baseobj->value.obj.handlers = &dom_object_handlers; + baseobj->value.obj.handlers = dom_get_obj_handlers(TSRMLS_C); zval_copy_ctor(baseobj); } mapptr->baseobjptr = baseobj; @@ -898,7 +920,7 @@ retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t)dom_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -915,7 +937,7 @@ retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t)dom_xpath_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -979,7 +1001,7 @@ retval.handle = zend_objects_store_put(intern, dom_nnodemap_object_dtor, (zend_objects_free_object_storage_t)dom_nnodemap_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -1016,7 +1038,7 @@ return_value->type = IS_OBJECT; return_value->is_ref = 1; return_value->value.obj.handle = intern->handle; - return_value->value.obj.handlers = &dom_object_handlers; + return_value->value.obj.handlers = dom_get_obj_handlers(TSRMLS_C); zval_copy_ctor(return_value); *found = 1; return return_value; http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.h?r1=1.24&r2=1.25&ty=u Index: php-src/ext/dom/php_dom.h diff -u php-src/ext/dom/php_dom.h:1.24 php-src/ext/dom/php_dom.h:1.25 --- php-src/ext/dom/php_dom.h:1.24 Thu Feb 12 05:43:20 2004 +++ php-src/ext/dom/php_dom.h Mon Aug 30 11:07:20 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.h,v 1.24 2004/02/12 10:43:20 zeev Exp $ */ +/* $Id: php_dom.h,v 1.25 2004/08/30 15:07:20 rrichards Exp $ */ #ifndef PHP_DOM_H #define PHP_DOM_H @@ -104,7 +104,7 @@ int dom_node_is_read_only(xmlNodePtr node); int dom_node_children_valid(xmlNodePtr node); void php_dom_create_interator(zval *return_value, int ce_type TSRMLS_DC); -void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns); +void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns TSRMLS_DC); 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);
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.58&r2=1.59&ty=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.58 php-src/ext/dom/document.c:1.59 --- php-src/ext/dom/document.c:1.58 Wed Aug 25 04:27:07 2004 +++ php-src/ext/dom/document.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.58 2004/08/25 08:27:07 chregu Exp $ */ +/* $Id: document.c,v 1.59 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1058,7 +1058,7 @@ php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC); namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); + dom_namednode_iter(intern, 0, namednode, NULL, local, NULL TSRMLS_CC); } /* }}} end dom_document_get_elements_by_tag_name */ @@ -1258,7 +1258,7 @@ namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri); + dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri TSRMLS_CC); } /* }}} end dom_document_get_elements_by_tag_name_ns */ http://cvs.php.net/diff.php/php-src/ext/dom/documenttype.c?r1=1.12&r2=1.13&ty=u Index: php-src/ext/dom/documenttype.c diff -u php-src/ext/dom/documenttype.c:1.12 php-src/ext/dom/documenttype.c:1.13 --- php-src/ext/dom/documenttype.c:1.12 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/documenttype.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documenttype.c,v 1.12 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: documenttype.c,v 1.13 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -88,7 +88,7 @@ entityht = (xmlHashTable *) doctypep->entities; intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ENTITY_NODE, intern, entityht, NULL, NULL); + dom_namednode_iter(obj, XML_ENTITY_NODE, intern, entityht, NULL, NULL TSRMLS_CC); return SUCCESS; } @@ -121,7 +121,7 @@ notationht = (xmlHashTable *) doctypep->notations; intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_NOTATION_NODE, intern, notationht, NULL, NULL); + dom_namednode_iter(obj, XML_NOTATION_NODE, intern, notationht, NULL, NULL TSRMLS_CC); return SUCCESS; } http://cvs.php.net/diff.php/php-src/ext/dom/element.c?r1=1.30&r2=1.31&ty=u Index: php-src/ext/dom/element.c diff -u php-src/ext/dom/element.c:1.30 php-src/ext/dom/element.c:1.31 --- php-src/ext/dom/element.c:1.30 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/element.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.30 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: element.c,v 1.31 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -455,7 +455,7 @@ php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC); namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, NULL); + dom_namednode_iter(intern, 0, namednode, NULL, local, NULL TSRMLS_CC); } /* }}} end dom_element_get_elements_by_tag_name */ @@ -777,7 +777,7 @@ namednode = (dom_object *)zend_objects_get_address(return_value TSRMLS_CC); local = xmlCharStrndup(name, name_len); nsuri = xmlCharStrndup(uri, uri_len); - dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri); + dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri TSRMLS_CC); } /* }}} end dom_element_get_elements_by_tag_name_ns */ http://cvs.php.net/diff.php/php-src/ext/dom/node.c?r1=1.29&r2=1.30&ty=u Index: php-src/ext/dom/node.c diff -u php-src/ext/dom/node.c:1.29 php-src/ext/dom/node.c:1.30 --- php-src/ext/dom/node.c:1.29 Sun Jun 13 06:12:47 2004 +++ php-src/ext/dom/node.c Mon Aug 30 11:07:19 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c,v 1.29 2004/06/13 10:12:47 rrichards Exp $ */ +/* $Id: node.c,v 1.30 2004/08/30 15:07:19 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -351,7 +351,7 @@ } else { php_dom_create_interator(*retval, DOM_NODELIST TSRMLS_CC); intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); + dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL TSRMLS_CC); } return SUCCESS; @@ -529,7 +529,7 @@ if (nodep->type == XML_ELEMENT_NODE) { php_dom_create_interator(*retval, DOM_NAMEDNODEMAP TSRMLS_CC); intern = (dom_object *)zend_objects_get_address(*retval TSRMLS_CC); - dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL); + dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL TSRMLS_CC); } else { ZVAL_NULL(*retval); } http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.62&r2=1.63&ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.62 php-src/ext/dom/php_dom.c:1.63 --- php-src/ext/dom/php_dom.c:1.62 Fri Aug 13 08:32:55 2004 +++ php-src/ext/dom/php_dom.c Mon Aug 30 11:07:20 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.62 2004/08/13 12:32:55 chregu Exp $ */ +/* $Id: php_dom.c,v 1.63 2004/08/30 15:07:20 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -35,6 +35,7 @@ #define PHP_XPTR 2 zend_object_handlers dom_object_handlers; +zend_object_handlers dom_ze1_object_handlers; static HashTable classes; @@ -334,7 +335,7 @@ obj = &EG(objects_store).object_buckets[handle].bucket.obj; if (obj->clone == NULL) { - zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name); + php_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(zobject)->name); } obj->clone(obj->object, &new_object TSRMLS_CC); @@ -347,11 +348,26 @@ return retval; } +zend_object_value dom_objects_ze1_clone_obj(zval *zobject TSRMLS_DC) +{ + php_error(E_ERROR, "Cannot clone object of class %s due to 'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name); + /* Return zobject->value.obj just to satisfy compiler */ + return zobject->value.obj; +} + static zend_function_entry dom_functions[] = { PHP_FE(dom_import_simplexml, NULL) {NULL, NULL, NULL} }; +static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) { + if (EG(ze1_compatibility_mode)) { + return &dom_ze1_object_handlers; + } else { + return &dom_object_handlers; + } +} + zend_module_entry dom_module_entry = { STANDARD_MODULE_HEADER, "dom", @@ -380,6 +396,12 @@ dom_object_handlers.get_property_ptr_ptr = NULL; dom_object_handlers.clone_obj = dom_objects_store_clone_obj; + memcpy(&dom_ze1_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + dom_ze1_object_handlers.read_property = dom_read_property; + dom_ze1_object_handlers.write_property = dom_write_property; + dom_ze1_object_handlers.get_property_ptr_ptr = NULL; + dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj; + zend_hash_init(&classes, 0, NULL, NULL, 1); INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions); @@ -807,7 +829,7 @@ } /* }}} */ -void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns) +void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns TSRMLS_DC) { dom_nnodemap_object *mapptr; zval *baseobj = NULL; @@ -818,7 +840,7 @@ baseobj->type = IS_OBJECT; baseobj->is_ref = 1; baseobj->value.obj.handle = basenode->handle; - baseobj->value.obj.handlers = &dom_object_handlers; + baseobj->value.obj.handlers = dom_get_obj_handlers(TSRMLS_C); zval_copy_ctor(baseobj); } mapptr->baseobjptr = baseobj; @@ -898,7 +920,7 @@ retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t)dom_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -915,7 +937,7 @@ retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t)dom_xpath_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -979,7 +1001,7 @@ retval.handle = zend_objects_store_put(intern, dom_nnodemap_object_dtor, (zend_objects_free_object_storage_t)dom_nnodemap_objects_free_storage, dom_objects_clone TSRMLS_CC); intern->handle = retval.handle; - retval.handlers = &dom_object_handlers; + retval.handlers = dom_get_obj_handlers(TSRMLS_C); return retval; } @@ -1016,7 +1038,7 @@ return_value->type = IS_OBJECT; return_value->is_ref = 1; return_value->value.obj.handle = intern->handle; - return_value->value.obj.handlers = &dom_object_handlers; + return_value->value.obj.handlers = dom_get_obj_handlers(TSRMLS_C); zval_copy_ctor(return_value); *found = 1; return return_value; http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.h?r1=1.24&r2=1.25&ty=u Index: php-src/ext/dom/php_dom.h diff -u php-src/ext/dom/php_dom.h:1.24 php-src/ext/dom/php_dom.h:1.25 --- php-src/ext/dom/php_dom.h:1.24 Thu Feb 12 05:43:20 2004 +++ php-src/ext/dom/php_dom.h Mon Aug 30 11:07:20 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.h,v 1.24 2004/02/12 10:43:20 zeev Exp $ */ +/* $Id: php_dom.h,v 1.25 2004/08/30 15:07:20 rrichards Exp $ */ #ifndef PHP_DOM_H #define PHP_DOM_H @@ -104,7 +104,7 @@ int dom_node_is_read_only(xmlNodePtr node); int dom_node_children_valid(xmlNodePtr node); void php_dom_create_interator(zval *return_value, int ce_type TSRMLS_DC); -void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns); +void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xmlHashTablePtr ht, xmlChar *local, xmlChar *ns TSRMLS_DC); 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);