summaryrefslogtreecommitdiff
path: root/ext/libxml/libxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/libxml/libxml.c')
-rw-r--r--ext/libxml/libxml.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 923194833..a715c5403 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: libxml.c,v 1.32.2.7.2.15 2007/08/01 11:43:05 tony2001 Exp $ */
+/* $Id: libxml.c,v 1.32.2.7.2.17 2008/01/30 15:29:51 rrichards Exp $ */
#define IS_EXT_MODULE
@@ -141,24 +141,6 @@ zend_module_entry libxml_module_entry = {
/* }}} */
/* {{{ internal functions for interoperability */
-static int php_libxml_dec_node(php_libxml_node_ptr *nodeptr)
-{
- int ret_refcount;
-
- ret_refcount = --nodeptr->refcount;
- if (ret_refcount == 0) {
- if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {
- nodeptr->node->_private = NULL;
- }
- /* node is destroyed by another object. reset ret_refcount to 1 and node to NULL
- so the php_libxml_node_ptr is detroyed when the object is destroyed */
- nodeptr->refcount = 1;
- nodeptr->node = NULL;
- }
-
- return ret_refcount;
-}
-
static int php_libxml_clear_object(php_libxml_node_object *object TSRMLS_DC)
{
if (object->properties) {
@@ -179,7 +161,10 @@ static int php_libxml_unregister_node(xmlNodePtr nodep TSRMLS_DC)
if (wrapper) {
php_libxml_clear_object(wrapper TSRMLS_CC);
} else {
- php_libxml_dec_node(nodeptr);
+ if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {
+ nodeptr->node->_private = NULL;
+ }
+ nodeptr->node = NULL;
}
}