summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c278
1 files changed, 139 insertions, 139 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 133572af3f..9f6c093f76 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -240,13 +240,13 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-B63ED1A31
Since:
*/
-int dom_document_doctype_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_doctype_read(dom_object *obj, zval *retval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
xmlDtdPtr dtdptr;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -256,7 +256,7 @@ int dom_document_doctype_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
- php_dom_create_object((xmlNodePtr) dtdptr, retval, obj TSRMLS_CC);
+ php_dom_create_object((xmlNodePtr) dtdptr, retval, obj);
return SUCCESS;
}
@@ -267,9 +267,9 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1B793EBA
Since:
*/
-int dom_document_implementation_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_implementation_read(dom_object *obj, zval *retval)
{
- php_dom_create_implementation(retval TSRMLS_CC);
+ php_dom_create_implementation(retval);
return SUCCESS;
}
@@ -280,13 +280,13 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-87CD092
Since:
*/
-int dom_document_document_element_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_document_element_read(dom_object *obj, zval *retval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
xmlNode *root;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -296,7 +296,7 @@ int dom_document_document_element_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
- php_dom_create_object(root, retval, obj TSRMLS_CC);
+ php_dom_create_object(root, retval, obj);
return SUCCESS;
}
@@ -306,13 +306,13 @@ int dom_document_document_element_read(dom_object *obj, zval *retval TSRMLS_DC)
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-encoding
Since: DOM Level 3
*/
-int dom_document_encoding_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_encoding_read(dom_object *obj, zval *retval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
char *encoding;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -327,14 +327,14 @@ int dom_document_encoding_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_encoding_write(dom_object *obj, zval *newval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
zend_string *str;
xmlCharEncodingHandlerPtr handler;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -349,7 +349,7 @@ int dom_document_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
}
docp->encoding = xmlStrdup((const xmlChar *) str->val);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Document Encoding");
+ php_error_docref(NULL, E_WARNING, "Invalid Document Encoding");
}
zend_string_release(str);
@@ -363,14 +363,14 @@ readonly=no
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-standalone
Since: DOM Level 3
*/
-int dom_document_standalone_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_standalone_read(dom_object *obj, zval *retval)
{
xmlDoc *docp;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -378,13 +378,13 @@ int dom_document_standalone_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_standalone_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_standalone_write(dom_object *obj, zval *newval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
int standalone;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -401,13 +401,13 @@ readonly=no
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-version
Since: DOM Level 3
*/
-int dom_document_version_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_version_read(dom_object *obj, zval *retval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
char *version;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -422,13 +422,13 @@ int dom_document_version_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_version_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_version_write(dom_object *obj, zval *newval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
zend_string *str;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -451,7 +451,7 @@ readonly=no
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-strictErrorChecking
Since: DOM Level 3
*/
-int dom_document_strict_error_checking_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_strict_error_checking_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -462,12 +462,12 @@ int dom_document_strict_error_checking_read(dom_object *obj, zval *retval TSRMLS
return SUCCESS;
}
-int dom_document_strict_error_checking_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_strict_error_checking_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->stricterror = zend_is_true(newval TSRMLS_CC);
+ doc_prop->stricterror = zend_is_true(newval);
}
return SUCCESS;
@@ -478,7 +478,7 @@ int dom_document_strict_error_checking_write(dom_object *obj, zval *newval TSRML
/* {{{ formatOutput boolean
readonly=no
*/
-int dom_document_format_output_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_format_output_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -489,11 +489,11 @@ int dom_document_format_output_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_format_output_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->formatoutput = zend_is_true(newval TSRMLS_CC);
+ doc_prop->formatoutput = zend_is_true(newval);
}
return SUCCESS;
@@ -503,7 +503,7 @@ int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
/* {{{ validateOnParse boolean
readonly=no
*/
-int dom_document_validate_on_parse_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_validate_on_parse_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -514,11 +514,11 @@ int dom_document_validate_on_parse_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_validate_on_parse_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_validate_on_parse_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->validateonparse = zend_is_true(newval TSRMLS_CC);
+ doc_prop->validateonparse = zend_is_true(newval);
}
return SUCCESS;
@@ -528,7 +528,7 @@ int dom_document_validate_on_parse_write(dom_object *obj, zval *newval TSRMLS_DC
/* {{{ resolveExternals boolean
readonly=no
*/
-int dom_document_resolve_externals_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_resolve_externals_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -539,11 +539,11 @@ int dom_document_resolve_externals_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_resolve_externals_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_resolve_externals_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->resolveexternals = zend_is_true(newval TSRMLS_CC);
+ doc_prop->resolveexternals = zend_is_true(newval);
}
return SUCCESS;
@@ -553,7 +553,7 @@ int dom_document_resolve_externals_write(dom_object *obj, zval *newval TSRMLS_DC
/* {{{ preserveWhiteSpace boolean
readonly=no
*/
-int dom_document_preserve_whitespace_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_preserve_whitespace_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -564,11 +564,11 @@ int dom_document_preserve_whitespace_read(dom_object *obj, zval *retval TSRMLS_D
return SUCCESS;
}
-int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->preservewhitespace = zend_is_true(newval TSRMLS_CC);
+ doc_prop->preservewhitespace = zend_is_true(newval);
}
return SUCCESS;
@@ -578,7 +578,7 @@ int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_
/* {{{ recover boolean
readonly=no
*/
-int dom_document_recover_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_recover_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -589,11 +589,11 @@ int dom_document_recover_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_recover_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->recover = zend_is_true(newval TSRMLS_CC);
+ doc_prop->recover = zend_is_true(newval);
}
return SUCCESS;
@@ -603,7 +603,7 @@ int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC)
/* {{{ substituteEntities boolean
readonly=no
*/
-int dom_document_substitue_entities_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_substitue_entities_read(dom_object *obj, zval *retval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
@@ -614,11 +614,11 @@ int dom_document_substitue_entities_read(dom_object *obj, zval *retval TSRMLS_DC
return SUCCESS;
}
-int dom_document_substitue_entities_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_substitue_entities_write(dom_object *obj, zval *newval)
{
if (obj->document) {
dom_doc_propsptr doc_prop = dom_get_doc_props(obj->document);
- doc_prop->substituteentities = zend_is_true(newval TSRMLS_CC);
+ doc_prop->substituteentities = zend_is_true(newval);
}
return SUCCESS;
@@ -630,13 +630,13 @@ readonly=no
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-documentURI
Since: DOM Level 3
*/
-int dom_document_document_uri_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_document_uri_read(dom_object *obj, zval *retval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
char *url;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -650,13 +650,13 @@ int dom_document_document_uri_read(dom_object *obj, zval *retval TSRMLS_DC)
return SUCCESS;
}
-int dom_document_document_uri_write(dom_object *obj, zval *newval TSRMLS_DC)
+int dom_document_document_uri_write(dom_object *obj, zval *newval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
zend_string *str;
if (docp == NULL) {
- php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 0);
return FAILURE;
}
@@ -679,7 +679,7 @@ readonly=yes
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-config
Since: DOM Level 3
*/
-int dom_document_config_read(dom_object *obj, zval *retval TSRMLS_DC)
+int dom_document_config_read(dom_object *obj, zval *retval)
{
ZVAL_NULL(retval);
return SUCCESS;
@@ -701,14 +701,14 @@ PHP_FUNCTION(dom_document_create_element)
size_t name_len, value_len;
char *name, *value = NULL;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
if (xmlValidateName((xmlChar *) name, 0) != 0) {
- php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -733,7 +733,7 @@ PHP_FUNCTION(dom_document_create_document_fragment)
dom_object *intern;
int ret;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
}
@@ -762,7 +762,7 @@ PHP_FUNCTION(dom_document_create_text_node)
dom_object *intern;
char *value;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
@@ -791,7 +791,7 @@ PHP_FUNCTION(dom_document_create_comment)
dom_object *intern;
char *value;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
@@ -820,7 +820,7 @@ PHP_FUNCTION(dom_document_create_cdatasection)
dom_object *intern;
char *value;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
@@ -849,14 +849,14 @@ PHP_FUNCTION(dom_document_create_processing_instruction)
dom_object *intern;
char *name, *value = NULL;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
if (xmlValidateName((xmlChar *) name, 0) != 0) {
- php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -885,14 +885,14 @@ PHP_FUNCTION(dom_document_create_attribute)
dom_object *intern;
char *name;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
if (xmlValidateName((xmlChar *) name, 0) != 0) {
- php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -920,14 +920,14 @@ PHP_FUNCTION(dom_document_create_entity_reference)
size_t name_len;
char *name;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
if (xmlValidateName((xmlChar *) name, 0) != 0) {
- php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(INVALID_CHARACTER_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -953,16 +953,16 @@ PHP_FUNCTION(dom_document_get_elements_by_tag_name)
char *name;
xmlChar *local;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC);
+ php_dom_create_interator(return_value, DOM_NODELIST);
namednode = Z_DOMOBJ_P(return_value);
local = xmlCharStrndup(name, name_len);
- dom_namednode_iter(intern, 0, namednode, NULL, local, NULL TSRMLS_CC);
+ dom_namednode_iter(intern, 0, namednode, NULL, local, NULL);
}
/* }}} end dom_document_get_elements_by_tag_name */
@@ -979,7 +979,7 @@ PHP_FUNCTION(dom_document_import_node)
int ret;
zend_long recursive = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
return;
}
@@ -989,7 +989,7 @@ PHP_FUNCTION(dom_document_import_node)
if (nodep->type == XML_HTML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_NODE
|| nodep->type == XML_DOCUMENT_TYPE_NODE) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot import: Node Type Not Supported");
+ php_error_docref(NULL, E_WARNING, "Cannot import: Node Type Not Supported");
RETURN_FALSE;
}
@@ -1038,7 +1038,7 @@ PHP_FUNCTION(dom_document_create_element_ns)
int errorcode;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
@@ -1070,7 +1070,7 @@ PHP_FUNCTION(dom_document_create_element_ns)
if (nodep != NULL) {
xmlFreeNode(nodep);
}
- php_dom_throw_error(errorcode, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(errorcode, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -1102,7 +1102,7 @@ PHP_FUNCTION(dom_document_create_attribute_ns)
dom_object *intern;
int errorcode;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
return;
}
@@ -1126,7 +1126,7 @@ PHP_FUNCTION(dom_document_create_attribute_ns)
}
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Document Missing Root Element");
+ php_error_docref(NULL, E_WARNING, "Document Missing Root Element");
RETURN_FALSE;
}
@@ -1139,7 +1139,7 @@ PHP_FUNCTION(dom_document_create_attribute_ns)
if (nodep != NULL) {
xmlFreeProp((xmlAttrPtr) nodep);
}
- php_dom_throw_error(errorcode, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(errorcode, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
@@ -1164,17 +1164,17 @@ PHP_FUNCTION(dom_document_get_elements_by_tag_name_ns)
char *uri, *name;
xmlChar *local, *nsuri;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- php_dom_create_interator(return_value, DOM_NODELIST TSRMLS_CC);
+ php_dom_create_interator(return_value, DOM_NODELIST);
namednode = Z_DOMOBJ_P(return_value);
local = xmlCharStrndup(name, name_len);
nsuri = xmlCharStrndup(uri, uri_len);
- dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri TSRMLS_CC);
+ dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri);
}
/* }}} end dom_document_get_elements_by_tag_name_ns */
@@ -1192,7 +1192,7 @@ PHP_FUNCTION(dom_document_get_element_by_id)
dom_object *intern;
char *idname;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) {
return;
}
@@ -1229,13 +1229,13 @@ PHP_FUNCTION(dom_document_normalize_document)
xmlDocPtr docp;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- dom_normalize((xmlNodePtr) docp TSRMLS_CC);
+ dom_normalize((xmlNodePtr) docp);
}
/* }}} end dom_document_normalize_document */
@@ -1261,17 +1261,17 @@ PHP_METHOD(domdocument, __construct)
int refcount;
zend_error_handling error_handling;
- zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) {
- zend_restore_error_handling(&error_handling TSRMLS_CC);
+ zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling);
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) {
+ zend_restore_error_handling(&error_handling);
return;
}
- zend_restore_error_handling(&error_handling TSRMLS_CC);
+ zend_restore_error_handling(&error_handling);
docp = xmlNewDoc((xmlChar *) version);
if (!docp) {
- php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC);
+ php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
}
@@ -1283,22 +1283,22 @@ PHP_METHOD(domdocument, __construct)
if (intern != NULL) {
olddoc = (xmlDocPtr) dom_object_get_node(intern);
if (olddoc != NULL) {
- php_libxml_decrement_node_ptr((php_libxml_node_object *) intern TSRMLS_CC);
- refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern TSRMLS_CC);
+ php_libxml_decrement_node_ptr((php_libxml_node_object *) intern);
+ refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern);
if (refcount != 0) {
olddoc->_private = NULL;
}
}
intern->document = NULL;
- if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp TSRMLS_CC) == -1) {
+ if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) {
RETURN_FALSE;
}
- php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern TSRMLS_CC);
+ php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern);
}
}
/* }}} end DOMDocument::__construct */
-char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) /* {{{ */
+char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len ) /* {{{ */
{
xmlURI *uri;
xmlChar *escsource;
@@ -1339,7 +1339,7 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
if ((uri->scheme == NULL || isFileUri)) {
/* XXX possible buffer overflow if VCWD_REALPATH does not know size of resolved_path */
- if (!VCWD_REALPATH(source, resolved_path) && !expand_filepath(source, resolved_path TSRMLS_CC)) {
+ if (!VCWD_REALPATH(source, resolved_path) && !expand_filepath(source, resolved_path)) {
xmlFreeURI(uri);
return NULL;
}
@@ -1352,7 +1352,7 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
}
/* }}} */
-static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t source_len, size_t options TSRMLS_DC) /* {{{ */
+static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t source_len, size_t options) /* {{{ */
{
xmlDocPtr ret;
xmlParserCtxtPtr ctxt = NULL;
@@ -1383,7 +1383,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
- char *file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
+ char *file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN );
if (file_dest) {
ctxt = xmlCreateFileParserCtxt(file_dest);
}
@@ -1480,20 +1480,20 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
zend_long options = 0;
id = getThis();
- if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) {
+ if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry)) {
id = NULL;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) {
return;
}
if (!source_len) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string supplied as input");
+ php_error_docref(NULL, E_WARNING, "Empty string supplied as input");
RETURN_FALSE;
}
- newdoc = dom_document_parser(id, mode, source, source_len, options TSRMLS_CC);
+ newdoc = dom_document_parser(id, mode, source, source_len, options);
if (!newdoc)
RETURN_FALSE;
@@ -1504,22 +1504,22 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
docp = (xmlDocPtr) dom_object_get_node(intern);
doc_prop = NULL;
if (docp != NULL) {
- php_libxml_decrement_node_ptr((php_libxml_node_object *) intern TSRMLS_CC);
+ php_libxml_decrement_node_ptr((php_libxml_node_object *) intern);
doc_prop = intern->document->doc_props;
intern->document->doc_props = NULL;
- refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern TSRMLS_CC);
+ refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern);
if (refcount != 0) {
docp->_private = NULL;
}
}
intern->document = NULL;
- if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc TSRMLS_CC) == -1) {
+ if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) {
RETURN_FALSE;
}
intern->document->doc_props = doc_prop;
}
- php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern TSRMLS_CC);
+ php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern);
RETURN_TRUE;
} else {
@@ -1562,12 +1562,12 @@ PHP_FUNCTION(dom_document_save)
char *file;
zend_long options = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
return;
}
if (file_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Filename");
+ php_error_docref(NULL, E_WARNING, "Invalid Filename");
RETURN_FALSE;
}
@@ -1608,7 +1608,7 @@ PHP_FUNCTION(dom_document_savexml)
int size, format, saveempty = 0;
zend_long options = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) {
return;
}
@@ -1621,12 +1621,12 @@ PHP_FUNCTION(dom_document_savexml)
/* Dump contents of Node */
DOM_GET_OBJ(node, nodep, xmlNodePtr, nodeobj);
if (node->doc != docp) {
- php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
buf = xmlBufferCreate();
if (!buf) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch buffer");
+ php_error_docref(NULL, E_WARNING, "Could not fetch buffer");
RETURN_FALSE;
}
if (options & LIBXML_SAVE_NOEMPTYTAG) {
@@ -1663,40 +1663,40 @@ PHP_FUNCTION(dom_document_savexml)
}
/* }}} end dom_document_savexml */
-static xmlNodePtr php_dom_free_xinclude_node(xmlNodePtr cur TSRMLS_DC) /* {{{ */
+static xmlNodePtr php_dom_free_xinclude_node(xmlNodePtr cur) /* {{{ */
{
xmlNodePtr xincnode;
xincnode = cur;
cur = cur->next;
xmlUnlinkNode(xincnode);
- php_libxml_node_free_resource(xincnode TSRMLS_CC);
+ php_libxml_node_free_resource(xincnode);
return cur;
}
/* }}} */
-static void php_dom_remove_xinclude_nodes(xmlNodePtr cur TSRMLS_DC) /* {{{ */
+static void php_dom_remove_xinclude_nodes(xmlNodePtr cur) /* {{{ */
{
while(cur) {
if (cur->type == XML_XINCLUDE_START) {
- cur = php_dom_free_xinclude_node(cur TSRMLS_CC);
+ cur = php_dom_free_xinclude_node(cur);
/* XML_XINCLUDE_END node will be a sibling of XML_XINCLUDE_START */
while(cur && cur->type != XML_XINCLUDE_END) {
/* remove xinclude processing nodes from recursive xincludes */
if (cur->type == XML_ELEMENT_NODE) {
- php_dom_remove_xinclude_nodes(cur->children TSRMLS_CC);
+ php_dom_remove_xinclude_nodes(cur->children);
}
cur = cur->next;
}
if (cur && cur->type == XML_XINCLUDE_END) {
- cur = php_dom_free_xinclude_node(cur TSRMLS_CC);
+ cur = php_dom_free_xinclude_node(cur);
}
} else {
if (cur->type == XML_ELEMENT_NODE) {
- php_dom_remove_xinclude_nodes(cur->children TSRMLS_CC);
+ php_dom_remove_xinclude_nodes(cur->children);
}
cur = cur->next;
}
@@ -1715,7 +1715,7 @@ PHP_FUNCTION(dom_document_xinclude)
int err;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) {
return;
}
@@ -1732,7 +1732,7 @@ PHP_FUNCTION(dom_document_xinclude)
root = root->next;
}
if (root) {
- php_dom_remove_xinclude_nodes(root TSRMLS_CC);
+ php_dom_remove_xinclude_nodes(root);
}
if (err) {
@@ -1754,7 +1754,7 @@ PHP_FUNCTION(dom_document_validate)
dom_object *intern;
xmlValidCtxt *cvp;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
}
@@ -1793,12 +1793,12 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
int is_valid;
char resolved_path[MAXPATHLEN + 1];
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op|l", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Op|l", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
return;
}
if (source_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema source");
+ php_error_docref(NULL, E_WARNING, "Invalid Schema source");
RETURN_FALSE;
}
@@ -1806,9 +1806,9 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
switch (type) {
case DOM_LOAD_FILE:
- valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
+ valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN );
if (!valid_file) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema file source");
+ php_error_docref(NULL, E_WARNING, "Invalid Schema file source");
RETURN_FALSE;
}
parser = xmlSchemaNewParserCtxt(valid_file);
@@ -1829,7 +1829,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
sptr = xmlSchemaParse(parser);
xmlSchemaFreeParserCtxt(parser);
if (!sptr) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema");
+ php_error_docref(NULL, E_WARNING, "Invalid Schema");
RETURN_FALSE;
}
@@ -1889,12 +1889,12 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
int is_valid;
char resolved_path[MAXPATHLEN + 1];
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op", &id, dom_document_class_entry, &source, &source_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Op", &id, dom_document_class_entry, &source, &source_len) == FAILURE) {
return;
}
if (source_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema source");
+ php_error_docref(NULL, E_WARNING, "Invalid Schema source");
RETURN_FALSE;
}
@@ -1902,9 +1902,9 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
switch (type) {
case DOM_LOAD_FILE:
- valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
+ valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN );
if (!valid_file) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid RelaxNG file source");
+ php_error_docref(NULL, E_WARNING, "Invalid RelaxNG file source");
RETURN_FALSE;
}
parser = xmlRelaxNGNewParserCtxt(valid_file);
@@ -1925,7 +1925,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
sptr = xmlRelaxNGParse(parser);
xmlRelaxNGFreeParserCtxt(parser);
if (!sptr) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid RelaxNG");
+ php_error_docref(NULL, E_WARNING, "Invalid RelaxNG");
RETURN_FALSE;
}
@@ -1983,12 +1983,12 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
id = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) {
return;
}
if (!source_len) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string supplied as input");
+ php_error_docref(NULL, E_WARNING, "Empty string supplied as input");
RETURN_FALSE;
}
@@ -2020,28 +2020,28 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
if (!newdoc)
RETURN_FALSE;
- if (id != NULL && instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) {
+ if (id != NULL && instanceof_function(Z_OBJCE_P(id), dom_document_class_entry)) {
intern = Z_DOMOBJ_P(id);
if (intern != NULL) {
docp = (xmlDocPtr) dom_object_get_node(intern);
doc_prop = NULL;
if (docp != NULL) {
- php_libxml_decrement_node_ptr((php_libxml_node_object *) intern TSRMLS_CC);
+ php_libxml_decrement_node_ptr((php_libxml_node_object *) intern);
doc_prop = intern->document->doc_props;
intern->document->doc_props = NULL;
- refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern TSRMLS_CC);
+ refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern);
if (refcount != 0) {
docp->_private = NULL;
}
}
intern->document = NULL;
- if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc TSRMLS_CC) == -1) {
+ if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) {
RETURN_FALSE;
}
intern->document->doc_props = doc_prop;
}
- php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern TSRMLS_CC);
+ php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern);
RETURN_TRUE;
} else {
@@ -2082,12 +2082,12 @@ PHP_FUNCTION(dom_document_save_html_file)
char *file;
const char *encoding;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) {
return;
}
if (file_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Filename");
+ php_error_docref(NULL, E_WARNING, "Invalid Filename");
RETURN_FALSE;
}
@@ -2121,7 +2121,7 @@ PHP_FUNCTION(dom_document_save_html)
int size = 0, format;
dom_doc_propsptr doc_props;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O|O!", &id, dom_document_class_entry, &nodep, dom_node_class_entry)
== FAILURE) {
return;
@@ -2136,13 +2136,13 @@ PHP_FUNCTION(dom_document_save_html)
/* Dump contents of Node */
DOM_GET_OBJ(node, nodep, xmlNodePtr, nodeobj);
if (node->doc != docp) {
- php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
+ php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
buf = xmlBufferCreate();
if (!buf) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch buffer");
+ php_error_docref(NULL, E_WARNING, "Could not fetch buffer");
RETURN_FALSE;
}
@@ -2170,7 +2170,7 @@ PHP_FUNCTION(dom_document_save_html)
RETVAL_STRINGL((const char*) mem, size);
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error dumping HTML node");
+ php_error_docref(NULL, E_WARNING, "Error dumping HTML node");
RETVAL_FALSE;
}
xmlBufferFree(buf);
@@ -2203,19 +2203,19 @@ PHP_METHOD(domdocument, registerNodeClass)
zend_class_entry *basece = dom_node_class_entry, *ce = NULL;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OCC!", &id, dom_document_class_entry, &basece, &ce) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OCC!", &id, dom_document_class_entry, &basece, &ce) == FAILURE) {
return;
}
- if (ce == NULL || instanceof_function(ce, basece TSRMLS_CC)) {
+ if (ce == NULL || instanceof_function(ce, basece)) {
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- if (dom_set_doc_classmap(intern->document, basece, ce TSRMLS_CC) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s could not be registered.", ce->name->val);
+ if (dom_set_doc_classmap(intern->document, basece, ce) == FAILURE) {
+ php_error_docref(NULL, E_ERROR, "Class %s could not be registered.", ce->name->val);
}
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from %s.", ce->name->val, basece->name->val);
+ php_error_docref(NULL, E_ERROR, "Class %s is not derived from %s.", ce->name->val, basece->name->val);
}
RETURN_FALSE;