summaryrefslogtreecommitdiff
path: root/ext/dom/cdatasection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/cdatasection.c')
-rw-r--r--ext/dom/cdatasection.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c
index dc8a3f1492..82af257c0a 100644
--- a/ext/dom/cdatasection.c
+++ b/ext/dom/cdatasection.c
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 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 |
@@ -54,7 +54,7 @@ PHP_METHOD(domcdatasection, __construct)
xmlNodePtr nodep = NULL, oldnode = NULL;
dom_object *intern;
char *value = NULL;
- int value_len;
+ size_t value_len;
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
@@ -71,14 +71,12 @@ PHP_METHOD(domcdatasection, __construct)
RETURN_FALSE;
}
- intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
- if (intern != NULL) {
- oldnode = dom_object_get_node(intern);
- if (oldnode != NULL) {
- php_libxml_node_free_resource(oldnode TSRMLS_CC);
- }
- php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
+ intern = Z_DOMOBJ_P(id);
+ oldnode = dom_object_get_node(intern);
+ if (oldnode != NULL) {
+ php_libxml_node_free_resource(oldnode TSRMLS_CC);
}
+ php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
/* }}} end DOMCdataSection::__construct */