diff options
author | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
commit | bdeb220f48825642f84cdbf3ff23a30613c92e86 (patch) | |
tree | 1a6cf34d20420e4815b4becb21311a4457d84103 /ext/dom/node.c | |
parent | bb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff) | |
download | php-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz |
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/dom/node.c')
-rw-r--r-- | ext/dom/node.c | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/ext/dom/node.c b/ext/dom/node.c index b2079ffda2..a51cb52747 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -196,7 +196,7 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68D095 Since: */ -int dom_node_node_name_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_node_name_read(dom_object *obj, zval *retval) { xmlNode *nodep; xmlNsPtr ns; @@ -206,7 +206,7 @@ int dom_node_node_name_read(dom_object *obj, zval *retval TSRMLS_DC) nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -259,7 +259,7 @@ int dom_node_node_name_read(dom_object *obj, zval *retval TSRMLS_DC) str = "#text"; break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Node Type"); + php_error_docref(NULL, E_WARNING, "Invalid Node Type"); } if (str != NULL) { @@ -283,13 +283,13 @@ readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68D080 Since: */ -int dom_node_node_value_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_node_value_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); char *str = NULL; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -322,12 +322,12 @@ int dom_node_node_value_read(dom_object *obj, zval *retval TSRMLS_DC) } -int dom_node_node_value_write(dom_object *obj, zval *newval TSRMLS_DC) +int dom_node_node_value_write(dom_object *obj, zval *newval) { xmlNode *nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -336,7 +336,7 @@ int dom_node_node_value_write(dom_object *obj, zval *newval TSRMLS_DC) case XML_ELEMENT_NODE: case XML_ATTRIBUTE_NODE: if (nodep->children) { - node_list_unlink(nodep->children TSRMLS_CC); + node_list_unlink(nodep->children); } case XML_TEXT_NODE: case XML_COMMENT_NODE: @@ -362,14 +362,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-111237558 Since: */ -int dom_node_node_type_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_node_type_read(dom_object *obj, zval *retval) { xmlNode *nodep; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -390,14 +390,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1060184317 Since: */ -int dom_node_parent_node_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_parent_node_read(dom_object *obj, zval *retval) { xmlNode *nodep, *nodeparent; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -407,7 +407,7 @@ int dom_node_parent_node_read(dom_object *obj, zval *retval TSRMLS_DC) return SUCCESS; } - php_dom_create_object(nodeparent, retval, obj TSRMLS_CC); + php_dom_create_object(nodeparent, retval, obj); return SUCCESS; } @@ -418,22 +418,22 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1451460987 Since: */ -int dom_node_child_nodes_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_child_nodes_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); dom_object *intern; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } if (dom_node_children_valid(nodep) == FAILURE) { ZVAL_NULL(retval); } else { - php_dom_create_interator(retval, DOM_NODELIST TSRMLS_CC); + php_dom_create_interator(retval, DOM_NODELIST); intern = Z_DOMOBJ_P(retval); - dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL TSRMLS_CC); + dom_namednode_iter(obj, XML_ELEMENT_NODE, intern, NULL, NULL, NULL); } return SUCCESS; @@ -446,14 +446,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-169727388 Since: */ -int dom_node_first_child_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_first_child_read(dom_object *obj, zval *retval) { xmlNode *nodep, *first = NULL; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -466,7 +466,7 @@ int dom_node_first_child_read(dom_object *obj, zval *retval TSRMLS_DC) return SUCCESS; } - php_dom_create_object(first, retval, obj TSRMLS_CC); + php_dom_create_object(first, retval, obj); return SUCCESS; } @@ -477,14 +477,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-61AD09FB Since: */ -int dom_node_last_child_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_last_child_read(dom_object *obj, zval *retval) { xmlNode *nodep, *last = NULL; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -497,7 +497,7 @@ int dom_node_last_child_read(dom_object *obj, zval *retval TSRMLS_DC) return SUCCESS; } - php_dom_create_object(last, retval, obj TSRMLS_CC); + php_dom_create_object(last, retval, obj); return SUCCESS; } @@ -508,14 +508,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-640FB3C8 Since: */ -int dom_node_previous_sibling_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_previous_sibling_read(dom_object *obj, zval *retval) { xmlNode *nodep, *prevsib; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -525,7 +525,7 @@ int dom_node_previous_sibling_read(dom_object *obj, zval *retval TSRMLS_DC) return SUCCESS; } - php_dom_create_object(prevsib, retval, obj TSRMLS_CC); + php_dom_create_object(prevsib, retval, obj); return SUCCESS; } @@ -536,14 +536,14 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6AC54C2F Since: */ -int dom_node_next_sibling_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_next_sibling_read(dom_object *obj, zval *retval) { xmlNode *nodep, *nextsib; nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -552,7 +552,7 @@ int dom_node_next_sibling_read(dom_object *obj, zval *retval TSRMLS_DC) return FAILURE; } - php_dom_create_object(nextsib, retval, obj TSRMLS_CC); + php_dom_create_object(nextsib, retval, obj); return SUCCESS; } @@ -563,20 +563,20 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-84CF096 Since: */ -int dom_node_attributes_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_attributes_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); dom_object *intern; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } if (nodep->type == XML_ELEMENT_NODE) { - php_dom_create_interator(retval, DOM_NAMEDNODEMAP TSRMLS_CC); + php_dom_create_interator(retval, DOM_NAMEDNODEMAP); intern = Z_DOMOBJ_P(retval); - dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL TSRMLS_CC); + dom_namednode_iter(obj, XML_ATTRIBUTE_NODE, intern, NULL, NULL, NULL); } else { ZVAL_NULL(retval); } @@ -591,13 +591,13 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-node-ownerDoc Since: */ -int dom_node_owner_document_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_owner_document_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); xmlDocPtr docp; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -611,7 +611,7 @@ int dom_node_owner_document_read(dom_object *obj, zval *retval TSRMLS_DC) return FAILURE; } - php_dom_create_object((xmlNodePtr) docp, retval, obj TSRMLS_CC); + php_dom_create_object((xmlNodePtr) docp, retval, obj); return SUCCESS; } @@ -622,13 +622,13 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSname Since: DOM Level 2 */ -int dom_node_namespace_uri_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_namespace_uri_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); char *str = NULL; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -661,14 +661,14 @@ readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSPrefix Since: DOM Level 2 */ -int dom_node_prefix_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_prefix_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); xmlNsPtr ns; char *str = NULL; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -695,7 +695,7 @@ int dom_node_prefix_read(dom_object *obj, zval *retval TSRMLS_DC) } -int dom_node_prefix_write(dom_object *obj, zval *newval TSRMLS_DC) +int dom_node_prefix_write(dom_object *obj, zval *newval) { zend_string *str; xmlNode *nodep, *nsnode = NULL; @@ -706,7 +706,7 @@ int dom_node_prefix_write(dom_object *obj, zval *newval TSRMLS_DC) nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -746,7 +746,7 @@ int dom_node_prefix_write(dom_object *obj, zval *newval TSRMLS_DC) if (ns == NULL) { zend_string_release(str); - php_dom_throw_error(NAMESPACE_ERR, dom_get_strict_error(obj->document) TSRMLS_CC); + php_dom_throw_error(NAMESPACE_ERR, dom_get_strict_error(obj->document)); return FAILURE; } @@ -768,12 +768,12 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeNSLocalN Since: DOM Level 2 */ -int dom_node_local_name_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_local_name_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -793,13 +793,13 @@ readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-baseURI Since: DOM Level 3 */ -int dom_node_base_uri_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_base_uri_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); xmlChar *baseuri; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -821,13 +821,13 @@ readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-textContent Since: DOM Level 3 */ -int dom_node_text_content_read(dom_object *obj, zval *retval TSRMLS_DC) +int dom_node_text_content_read(dom_object *obj, zval *retval) { xmlNode *nodep = dom_object_get_node(obj); char *str = NULL; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -843,14 +843,14 @@ int dom_node_text_content_read(dom_object *obj, zval *retval TSRMLS_DC) return SUCCESS; } -int dom_node_text_content_write(dom_object *obj, zval *newval TSRMLS_DC) +int dom_node_text_content_write(dom_object *obj, zval *newval) { xmlNode *nodep = dom_object_get_node(obj); zend_string *str; xmlChar *enc_str; if (nodep == NULL) { - php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); + php_dom_throw_error(INVALID_STATE_ERR, 0); return FAILURE; } @@ -865,7 +865,7 @@ int dom_node_text_content_write(dom_object *obj, zval *newval TSRMLS_DC) /* }}} */ -static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern, dom_object *childobj TSRMLS_DC) /* {{{ */ +static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib, xmlNodePtr fragment, dom_object *intern, dom_object *childobj) /* {{{ */ { xmlNodePtr newchild, node; @@ -893,7 +893,7 @@ static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, if (node->_private != NULL) { childobj = node->_private; childobj->document = intern->document; - php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL TSRMLS_CC); + php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL); } } if (node == fragment->last) { @@ -921,7 +921,7 @@ PHP_FUNCTION(dom_node_insert_before) dom_object *intern, *childobj, *refpobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|O!", &id, dom_node_class_entry, &node, dom_node_class_entry, &ref, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|O!", &id, dom_node_class_entry, &node, dom_node_class_entry, &ref, dom_node_class_entry) == FAILURE) { return; } @@ -939,34 +939,34 @@ PHP_FUNCTION(dom_node_insert_before) if (dom_node_is_read_only(parentp) == SUCCESS || (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { - php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); RETURN_FALSE; } if (dom_hierarchy(parentp, child) == FAILURE) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); RETURN_FALSE; } if (child->doc != parentp->doc && child->doc != NULL) { - php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); RETURN_FALSE; } if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Document Fragment is empty"); + php_error_docref(NULL, E_WARNING, "Document Fragment is empty"); RETURN_FALSE; } if (child->doc == NULL && parentp->doc != NULL) { childobj->document = intern->document; - php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL TSRMLS_CC); + php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL); } if (ref != NULL) { DOM_GET_OBJ(refp, ref, xmlNodePtr, refpobj); if (refp->parent != parentp) { - php_dom_throw_error(NOT_FOUND_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NOT_FOUND_ERR, stricterror); RETURN_FALSE; } @@ -1003,14 +1003,14 @@ PHP_FUNCTION(dom_node_insert_before) if (lastattr != NULL && lastattr->type != XML_ATTRIBUTE_DECL) { if (lastattr != (xmlAttrPtr) child) { xmlUnlinkNode((xmlNodePtr) lastattr); - php_libxml_node_free_resource((xmlNodePtr) lastattr TSRMLS_CC); + php_libxml_node_free_resource((xmlNodePtr) lastattr); } else { DOM_RET_OBJ(child, &ret, intern); return; } } } else if (child->type == XML_DOCUMENT_FRAG_NODE) { - new_child = _php_dom_insert_fragment(parentp, refp->prev, refp, child, intern, childobj TSRMLS_CC); + new_child = _php_dom_insert_fragment(parentp, refp->prev, refp, child, intern, childobj); } if (new_child == NULL) { @@ -1045,14 +1045,14 @@ PHP_FUNCTION(dom_node_insert_before) if (lastattr != NULL && lastattr->type != XML_ATTRIBUTE_DECL) { if (lastattr != (xmlAttrPtr) child) { xmlUnlinkNode((xmlNodePtr) lastattr); - php_libxml_node_free_resource((xmlNodePtr) lastattr TSRMLS_CC); + php_libxml_node_free_resource((xmlNodePtr) lastattr); } else { DOM_RET_OBJ(child, &ret, intern); return; } } } else if (child->type == XML_DOCUMENT_FRAG_NODE) { - new_child = _php_dom_insert_fragment(parentp, parentp->last, NULL, child, intern, childobj TSRMLS_CC); + new_child = _php_dom_insert_fragment(parentp, parentp->last, NULL, child, intern, childobj); } if (new_child == NULL) { new_child = xmlAddChild(parentp, child); @@ -1060,7 +1060,7 @@ PHP_FUNCTION(dom_node_insert_before) } if (NULL == new_child) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't add newnode as the previous sibling of refnode"); + php_error_docref(NULL, E_WARNING, "Couldn't add newnode as the previous sibling of refnode"); RETURN_FALSE; } @@ -1084,7 +1084,7 @@ PHP_FUNCTION(dom_node_replace_child) int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOO", &id, dom_node_class_entry, &newnode, dom_node_class_entry, &oldnode, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OOO", &id, dom_node_class_entry, &newnode, dom_node_class_entry, &oldnode, dom_node_class_entry) == FAILURE) { return; } @@ -1106,17 +1106,17 @@ PHP_FUNCTION(dom_node_replace_child) if (dom_node_is_read_only(nodep) == SUCCESS || (newchild->parent != NULL && dom_node_is_read_only(newchild->parent) == SUCCESS)) { - php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); RETURN_FALSE; } if (newchild->doc != nodep->doc && newchild->doc != NULL) { - php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); RETURN_FALSE; } if (dom_hierarchy(nodep, newchild) == FAILURE) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); RETURN_FALSE; } @@ -1137,7 +1137,7 @@ PHP_FUNCTION(dom_node_replace_child) xmlUnlinkNode(oldchild); - newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern, newchildobj TSRMLS_CC); + newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern, newchildobj); if (newchild) { dom_reconcile_ns(nodep->doc, newchild); } @@ -1145,7 +1145,7 @@ PHP_FUNCTION(dom_node_replace_child) if (newchild->doc == NULL && nodep->doc != NULL) { xmlSetTreeDoc(newchild, nodep->doc); newchildobj->document = intern->document; - php_libxml_increment_doc_ref((php_libxml_node_object *)newchildobj, NULL TSRMLS_CC); + php_libxml_increment_doc_ref((php_libxml_node_object *)newchildobj, NULL); } xmlReplaceNode(oldchild, newchild); dom_reconcile_ns(nodep->doc, newchild); @@ -1153,7 +1153,7 @@ PHP_FUNCTION(dom_node_replace_child) DOM_RET_OBJ(oldchild, &ret, intern); return; } else { - php_dom_throw_error(NOT_FOUND_ERR, dom_get_strict_error(intern->document) TSRMLS_CC); + php_dom_throw_error(NOT_FOUND_ERR, dom_get_strict_error(intern->document)); RETURN_FALSE; } } @@ -1170,7 +1170,7 @@ PHP_FUNCTION(dom_node_remove_child) dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1186,13 +1186,13 @@ PHP_FUNCTION(dom_node_remove_child) if (dom_node_is_read_only(nodep) == SUCCESS || (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { - php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); RETURN_FALSE; } children = nodep->children; if (!children) { - php_dom_throw_error(NOT_FOUND_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NOT_FOUND_ERR, stricterror); RETURN_FALSE; } @@ -1205,7 +1205,7 @@ PHP_FUNCTION(dom_node_remove_child) children = children->next; } - php_dom_throw_error(NOT_FOUND_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NOT_FOUND_ERR, stricterror); RETURN_FALSE } /* }}} end dom_node_remove_child */ @@ -1221,7 +1221,7 @@ PHP_FUNCTION(dom_node_append_child) dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1237,28 +1237,28 @@ PHP_FUNCTION(dom_node_append_child) if (dom_node_is_read_only(nodep) == SUCCESS || (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { - php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror); RETURN_FALSE; } if (dom_hierarchy(nodep, child) == FAILURE) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); RETURN_FALSE; } if (!(child->doc == NULL || child->doc == nodep->doc)) { - php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror TSRMLS_CC); + php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); RETURN_FALSE; } if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Document Fragment is empty"); + php_error_docref(NULL, E_WARNING, "Document Fragment is empty"); RETURN_FALSE; } if (child->doc == NULL && nodep->doc != NULL) { childobj->document = intern->document; - php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL TSRMLS_CC); + php_libxml_increment_doc_ref((php_libxml_node_object *)childobj, NULL); } if (child->parent != NULL){ @@ -1290,17 +1290,17 @@ PHP_FUNCTION(dom_node_append_child) if (lastattr != NULL && lastattr->type != XML_ATTRIBUTE_DECL) { if (lastattr != (xmlAttrPtr) child) { xmlUnlinkNode((xmlNodePtr) lastattr); - php_libxml_node_free_resource((xmlNodePtr) lastattr TSRMLS_CC); + php_libxml_node_free_resource((xmlNodePtr) lastattr); } } } else if (child->type == XML_DOCUMENT_FRAG_NODE) { - new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj TSRMLS_CC); + new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj); } if (new_child == NULL) { new_child = xmlAddChild(nodep, child); if (new_child == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't append node"); + php_error_docref(NULL, E_WARNING, "Couldn't append node"); RETURN_FALSE; } } @@ -1321,7 +1321,7 @@ PHP_FUNCTION(dom_node_has_child_nodes) xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1351,7 +1351,7 @@ PHP_FUNCTION(dom_node_clone_node) dom_object *intern; zend_long recursive = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_node_class_entry, &recursive) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|l", &id, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1410,13 +1410,13 @@ PHP_FUNCTION(dom_node_normalize) xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); - dom_normalize(nodep TSRMLS_CC); + dom_normalize(nodep); } /* }}} end dom_node_normalize */ @@ -1431,7 +1431,7 @@ PHP_FUNCTION(dom_node_is_supported) size_t feature_len, version_len; char *feature, *version; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_node_class_entry, &feature, &feature_len, &version, &version_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oss", &id, dom_node_class_entry, &feature, &feature_len, &version, &version_len) == FAILURE) { return; } @@ -1453,7 +1453,7 @@ PHP_FUNCTION(dom_node_has_attributes) xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1490,7 +1490,7 @@ PHP_FUNCTION(dom_node_is_same_node) xmlNodePtr nodeotherp, nodep; dom_object *intern, *nodeotherobj; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1519,7 +1519,7 @@ PHP_FUNCTION(dom_node_lookup_prefix) size_t uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1570,7 +1570,7 @@ PHP_FUNCTION(dom_node_is_default_namespace) size_t uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1603,7 +1603,7 @@ PHP_FUNCTION(dom_node_lookup_namespace_uri) size_t prefix_len; char *prefix; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!", &id, dom_node_class_entry, &prefix, &prefix_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os!", &id, dom_node_class_entry, &prefix, &prefix_len) == FAILURE) { return; } @@ -1682,13 +1682,13 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathObjectPtr xpathobjp=NULL; if (mode == 0) { - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|bba!a!", &id, dom_node_class_entry, &exclusive, &with_comments, &xpath_array, &ns_prefixes) == FAILURE) { return; } } else { - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os|bba!a!", &id, dom_node_class_entry, &file, &file_len, &exclusive, &with_comments, &xpath_array, &ns_prefixes) == FAILURE) { return; @@ -1700,7 +1700,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ docp = nodep->doc; if (! docp) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Node must be associated with a document"); + php_error_docref(NULL, E_WARNING, "Node must be associated with a document"); RETURN_FALSE; } @@ -1717,7 +1717,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathFreeObject(xpathobjp); } xmlXPathFreeContext(ctxp); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset."); + php_error_docref(NULL, E_WARNING, "XPath query did not return a nodeset."); RETURN_FALSE; } } @@ -1731,7 +1731,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ if (tmp && Z_TYPE_P(tmp) == IS_STRING) { xquery = Z_STRVAL_P(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "'query' missing from xpath array or is not a string"); + php_error_docref(NULL, E_WARNING, "'query' missing from xpath array or is not a string"); RETURN_FALSE; } @@ -1761,7 +1761,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathFreeObject(xpathobjp); } xmlXPathFreeContext(ctxp); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "XPath query did not return a nodeset."); + php_error_docref(NULL, E_WARNING, "XPath query did not return a nodeset."); RETURN_FALSE; } } @@ -1780,7 +1780,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ } ZEND_HASH_FOREACH_END(); inclusive_ns_prefixes[nscount] = NULL; } else { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, + php_error_docref(NULL, E_NOTICE, "Inclusive namespace prefixes only allowed in exclusive mode."); } } |