diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-11-15 19:54:19 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-11-15 19:54:19 +0300 |
commit | 0f7f1498be549f5988bf9d8150f35bedf70741c5 (patch) | |
tree | b9cada88f6a43fbcf2b1316ed8386a3249b0fa4a /ext/dom | |
parent | 8f2f80668e6988ac8907920d177e531a98dcb8b0 (diff) | |
download | php-git-0f7f1498be549f5988bf9d8150f35bedf70741c5.tar.gz |
Use ZEND_THIS macro to hide implementation details in extensions code.
Diffstat (limited to 'ext/dom')
-rw-r--r-- | ext/dom/attr.c | 4 | ||||
-rw-r--r-- | ext/dom/cdatasection.c | 2 | ||||
-rw-r--r-- | ext/dom/characterdata.c | 10 | ||||
-rw-r--r-- | ext/dom/comment.c | 2 | ||||
-rw-r--r-- | ext/dom/document.c | 50 | ||||
-rw-r--r-- | ext/dom/documentfragment.c | 4 | ||||
-rw-r--r-- | ext/dom/element.c | 38 | ||||
-rw-r--r-- | ext/dom/entityreference.c | 2 | ||||
-rw-r--r-- | ext/dom/namednodemap.c | 8 | ||||
-rw-r--r-- | ext/dom/node.c | 26 | ||||
-rw-r--r-- | ext/dom/nodelist.c | 4 | ||||
-rw-r--r-- | ext/dom/processinginstruction.c | 2 | ||||
-rw-r--r-- | ext/dom/text.c | 6 | ||||
-rw-r--r-- | ext/dom/xml_common.h | 2 | ||||
-rw-r--r-- | ext/dom/xpath.c | 6 |
15 files changed, 83 insertions, 83 deletions
diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 706ae06576..46f10ea9b4 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -63,7 +63,7 @@ PHP_METHOD(domattr, __construct) return; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { @@ -227,7 +227,7 @@ PHP_FUNCTION(dom_attr_is_id) dom_object *intern; xmlAttrPtr attrp; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index ac20bbe54a..e4840e8a5b 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -63,7 +63,7 @@ PHP_METHOD(domcdatasection, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { php_libxml_node_free_resource(oldnode ); diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index f2e2dcbe04..ea850c26f4 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -158,7 +158,7 @@ PHP_FUNCTION(dom_characterdata_substring_data) int length; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &offset, &count) == FAILURE) { return; } @@ -206,7 +206,7 @@ PHP_FUNCTION(dom_characterdata_append_data) char *arg; size_t arg_len; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &arg, &arg_len) == FAILURE) { return; } @@ -232,7 +232,7 @@ PHP_FUNCTION(dom_characterdata_insert_data) size_t arg_len; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &offset, &arg, &arg_len) == FAILURE) { return; } @@ -280,7 +280,7 @@ PHP_FUNCTION(dom_characterdata_delete_data) int length; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &offset, &count) == FAILURE) { return; } @@ -338,7 +338,7 @@ PHP_FUNCTION(dom_characterdata_replace_data) size_t arg_len; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lls", &offset, &count, &arg, &arg_len) == FAILURE) { return; } diff --git a/ext/dom/comment.c b/ext/dom/comment.c index 47525c77c7..cd4f7feee3 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -63,7 +63,7 @@ PHP_METHOD(domcomment, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); if (intern != NULL) { oldnode = dom_object_get_node(intern); if (oldnode != NULL) { diff --git a/ext/dom/document.c b/ext/dom/document.c index 9258e5b0fa..edb4e33af2 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -700,7 +700,7 @@ PHP_FUNCTION(dom_document_create_element) size_t name_len, value_len; char *name, *value = NULL; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -733,7 +733,7 @@ PHP_FUNCTION(dom_document_create_document_fragment) dom_object *intern; int ret; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -763,7 +763,7 @@ PHP_FUNCTION(dom_document_create_text_node) dom_object *intern; char *value; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &value, &value_len) == FAILURE) { return; } @@ -793,7 +793,7 @@ PHP_FUNCTION(dom_document_create_comment) dom_object *intern; char *value; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &value, &value_len) == FAILURE) { return; } @@ -823,7 +823,7 @@ PHP_FUNCTION(dom_document_create_cdatasection) dom_object *intern; char *value; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &value, &value_len) == FAILURE) { return; } @@ -853,7 +853,7 @@ PHP_FUNCTION(dom_document_create_processing_instruction) dom_object *intern; char *name, *value = NULL; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -890,7 +890,7 @@ PHP_FUNCTION(dom_document_create_attribute) dom_object *intern; char *name; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -926,7 +926,7 @@ PHP_FUNCTION(dom_document_create_entity_reference) size_t name_len; char *name; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -960,7 +960,7 @@ PHP_FUNCTION(dom_document_get_elements_by_tag_name) char *name; xmlChar *local; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -987,7 +987,7 @@ PHP_FUNCTION(dom_document_import_node) int ret; zend_bool recursive = 0; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &node, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1047,7 +1047,7 @@ PHP_FUNCTION(dom_document_create_element_ns) int errorcode; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s|s", &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -1112,7 +1112,7 @@ PHP_FUNCTION(dom_document_create_attribute_ns) dom_object *intern; int errorcode; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1175,7 +1175,7 @@ PHP_FUNCTION(dom_document_get_elements_by_tag_name_ns) char *uri, *name; xmlChar *local, *nsuri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1204,7 +1204,7 @@ PHP_FUNCTION(dom_document_get_element_by_id) dom_object *intern; char *idname; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &idname, &idname_len) == FAILURE) { return; } @@ -1242,7 +1242,7 @@ PHP_FUNCTION(dom_document_normalize_document) xmlDocPtr docp; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -1287,7 +1287,7 @@ PHP_METHOD(domdocument, __construct) docp->encoding = (const xmlChar *) xmlStrdup((xmlChar *) encoding); } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); if (intern != NULL) { olddoc = (xmlDocPtr) dom_object_get_node(intern); if (olddoc != NULL) { @@ -1582,7 +1582,7 @@ PHP_FUNCTION(dom_document_save) char *file; zend_long options = 0; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", &file, &file_len, &options) == FAILURE) { return; } @@ -1629,7 +1629,7 @@ PHP_FUNCTION(dom_document_savexml) int size, format, saveempty = 0; zend_long options = 0; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O!l", &nodep, dom_node_class_entry, &options) == FAILURE) { return; } @@ -1737,7 +1737,7 @@ PHP_FUNCTION(dom_document_xinclude) int err; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) { return; } @@ -1782,7 +1782,7 @@ PHP_FUNCTION(dom_document_validate) dom_object *intern; xmlValidCtxt *cvp; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -1822,7 +1822,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type int is_valid; char resolved_path[MAXPATHLEN + 1]; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &flags) == FAILURE) { return; } @@ -1921,7 +1921,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ int is_valid; char resolved_path[MAXPATHLEN + 1]; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &source, &source_len) == FAILURE) { return; } @@ -2132,7 +2132,7 @@ PHP_FUNCTION(dom_document_save_html_file) char *file; const char *encoding; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &file, &file_len) == FAILURE) { return; } @@ -2173,7 +2173,7 @@ PHP_FUNCTION(dom_document_save_html) int format; dom_doc_propsptr doc_props; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O!", &nodep, dom_node_class_entry) == FAILURE) { @@ -2256,7 +2256,7 @@ PHP_METHOD(domdocument, registerNodeClass) zend_class_entry *basece = dom_node_class_entry, *ce = NULL; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "CC!", &basece, &ce) == FAILURE) { return; } diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 645b11754a..de7afe61ec 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -64,7 +64,7 @@ PHP_METHOD(domdocumentfragment, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { php_libxml_node_free_resource(oldnode ); @@ -118,7 +118,7 @@ PHP_METHOD(domdocumentfragment, appendXML) { int err; xmlNodePtr lst; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &data, &data_len) == FAILURE) { return; } diff --git a/ext/dom/element.c b/ext/dom/element.c index 5e7db385a5..b81e06d306 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -212,7 +212,7 @@ PHP_METHOD(domelement, __construct) xmlNodeSetContentLen(nodep, (xmlChar *) value, value_len); } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { php_libxml_node_free_resource(oldnode ); @@ -325,7 +325,7 @@ PHP_FUNCTION(dom_element_get_attribute) xmlNodePtr attr; size_t name_len; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -369,7 +369,7 @@ PHP_FUNCTION(dom_element_set_attribute) dom_object *intern; char *name, *value; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -435,7 +435,7 @@ PHP_FUNCTION(dom_element_remove_attribute) size_t name_len; char *name; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -485,7 +485,7 @@ PHP_FUNCTION(dom_element_get_attribute_node) dom_object *intern; char *name; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -532,7 +532,7 @@ PHP_FUNCTION(dom_element_set_attribute_node) dom_object *intern, *attrobj, *oldobj; int ret; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_attr_class_entry) == FAILURE) { return; } @@ -599,7 +599,7 @@ PHP_FUNCTION(dom_element_remove_attribute_node) dom_object *intern, *attrobj; int ret; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_attr_class_entry) == FAILURE) { return; } @@ -638,7 +638,7 @@ PHP_FUNCTION(dom_element_get_elements_by_tag_name) char *name; xmlChar *local; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -666,7 +666,7 @@ PHP_FUNCTION(dom_element_get_attribute_ns) char *uri, *name; xmlChar *strattr; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -749,7 +749,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns) dom_object *intern; int errorcode = 0, stricterror, is_xmlns = 0, name_valid; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!ss", &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -876,7 +876,7 @@ PHP_FUNCTION(dom_element_remove_attribute_ns) size_t name_len, uri_len; char *name, *uri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -934,7 +934,7 @@ PHP_FUNCTION(dom_element_get_attribute_node_ns) int ret; char *uri, *name; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -989,7 +989,7 @@ PHP_FUNCTION(dom_element_set_attribute_node_ns) dom_object *intern, *attrobj, *oldobj; int ret; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_attr_class_entry) == FAILURE) { return; } @@ -1063,7 +1063,7 @@ PHP_FUNCTION(dom_element_get_elements_by_tag_name_ns) char *uri, *name; xmlChar *local, *nsuri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1092,7 +1092,7 @@ PHP_FUNCTION(dom_element_has_attribute) size_t name_len; xmlNodePtr attr; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { return; } @@ -1122,7 +1122,7 @@ PHP_FUNCTION(dom_element_has_attribute_ns) char *uri, *name; xmlChar *value; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1180,7 +1180,7 @@ PHP_FUNCTION(dom_element_set_id_attribute) size_t name_len; zend_bool is_id; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sb", &name, &name_len, &is_id) == FAILURE) { return; } @@ -1217,7 +1217,7 @@ PHP_FUNCTION(dom_element_set_id_attribute_ns) char *uri, *name; zend_bool is_id; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { return; } @@ -1252,7 +1252,7 @@ PHP_FUNCTION(dom_element_set_id_attribute_node) dom_object *intern, *attrobj; zend_bool is_id; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &node, dom_attr_class_entry, &is_id) == FAILURE) { return; } diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index eeb70a199c..12bbbb702a 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -69,7 +69,7 @@ PHP_METHOD(domentityreference, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); if (intern != NULL) { oldnode = dom_object_get_node(intern); if (oldnode != NULL) { diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c index 6926ee2fd3..285abaf7c5 100644 --- a/ext/dom/namednodemap.c +++ b/ext/dom/namednodemap.c @@ -138,7 +138,7 @@ PHP_FUNCTION(dom_namednodemap_get_named_item) xmlNodePtr nodep; xmlNotation *notep = NULL; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &named, &namedlen) == FAILURE) { return; } @@ -213,7 +213,7 @@ PHP_FUNCTION(dom_namednodemap_item) xmlNodePtr nodep, curnode; int count; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { return; } @@ -278,7 +278,7 @@ PHP_FUNCTION(dom_namednodemap_get_named_item_ns) xmlNodePtr nodep; xmlNotation *notep = NULL; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &urilen, &named, &namedlen) == FAILURE) { return; } @@ -344,7 +344,7 @@ PHP_FUNCTION(dom_namednodemap_count) zval *id; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } diff --git a/ext/dom/node.c b/ext/dom/node.c index cca472eb95..659fe81f47 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -929,7 +929,7 @@ PHP_FUNCTION(dom_node_insert_before) dom_object *intern, *childobj, *refpobj; int ret, stricterror; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O!", &node, dom_node_class_entry, &ref, dom_node_class_entry) == FAILURE) { return; } @@ -1093,7 +1093,7 @@ PHP_FUNCTION(dom_node_replace_child) int ret; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &newnode, dom_node_class_entry, &oldnode, dom_node_class_entry) == FAILURE) { return; } @@ -1180,7 +1180,7 @@ PHP_FUNCTION(dom_node_remove_child) dom_object *intern, *childobj; int ret, stricterror; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_node_class_entry) == FAILURE) { return; } @@ -1232,7 +1232,7 @@ PHP_FUNCTION(dom_node_append_child) dom_object *intern, *childobj; int ret, stricterror; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_node_class_entry) == FAILURE) { return; } @@ -1333,7 +1333,7 @@ PHP_FUNCTION(dom_node_has_child_nodes) xmlNode *nodep; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -1364,7 +1364,7 @@ PHP_FUNCTION(dom_node_clone_node) dom_object *intern; zend_bool recursive = 0; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &recursive) == FAILURE) { return; } @@ -1424,7 +1424,7 @@ PHP_FUNCTION(dom_node_normalize) xmlNode *nodep; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -1467,7 +1467,7 @@ PHP_FUNCTION(dom_node_has_attributes) xmlNode *nodep; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -1505,7 +1505,7 @@ PHP_FUNCTION(dom_node_is_same_node) xmlNodePtr nodeotherp, nodep; dom_object *intern, *nodeotherobj; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &node, dom_node_class_entry) == FAILURE) { return; } @@ -1535,7 +1535,7 @@ PHP_FUNCTION(dom_node_lookup_prefix) size_t uri_len = 0; char *uri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &uri, &uri_len) == FAILURE) { return; } @@ -1587,7 +1587,7 @@ PHP_FUNCTION(dom_node_is_default_namespace) size_t uri_len = 0; char *uri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &uri, &uri_len) == FAILURE) { return; } @@ -1621,7 +1621,7 @@ PHP_FUNCTION(dom_node_lookup_namespace_uri) size_t prefix_len; char *prefix; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &prefix, &prefix_len) == FAILURE) { return; } @@ -1700,7 +1700,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathContextPtr ctxp=NULL; xmlXPathObjectPtr xpathobjp=NULL; - id = &EX(This); + id = ZEND_THIS; if (mode == 0) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "|bba!a!", &exclusive, &with_comments, diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c index 3078c1abbe..da39f6a6c2 100644 --- a/ext/dom/nodelist.c +++ b/ext/dom/nodelist.c @@ -109,7 +109,7 @@ PHP_FUNCTION(dom_nodelist_count) zval *id; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } @@ -139,7 +139,7 @@ PHP_FUNCTION(dom_nodelist_item) xmlNodePtr nodep, curnode; int count = 0; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { return; } diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index e9d2cebe7d..e442bb1892 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -71,7 +71,7 @@ PHP_METHOD(domprocessinginstruction, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { php_libxml_node_free_resource(oldnode ); diff --git a/ext/dom/text.c b/ext/dom/text.c index 4c4abc9a89..05a063297e 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -78,7 +78,7 @@ PHP_METHOD(domtext, __construct) RETURN_FALSE; } - intern = Z_DOMOBJ_P(&EX(This)); + intern = Z_DOMOBJ_P(ZEND_THIS); if (intern != NULL) { oldnode = dom_object_get_node(intern); if (oldnode != NULL) { @@ -145,7 +145,7 @@ PHP_FUNCTION(dom_text_split_text) int length; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &offset) == FAILURE) { return; } @@ -201,7 +201,7 @@ PHP_FUNCTION(dom_text_is_whitespace_in_element_content) xmlNodePtr node; dom_object *intern; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters_none() == FAILURE) { return; } diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index e0acde1564..919cebde6c 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -84,7 +84,7 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); *ret = php_dom_create_object(obj, return_value, domobject) #define DOM_GET_THIS(zval) \ - do { zval = &EX(This); } while (0) + do { zval = ZEND_THIS; } while (0) #define DOM_GET_THIS_OBJ(__ptr, __id, __prtype, __intern) \ DOM_GET_THIS(__id); \ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 8453b33899..89391f4a4a 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -268,7 +268,7 @@ PHP_METHOD(domxpath, __construct) RETURN_FALSE; } - intern = Z_XPATHOBJ_P(&EX(This)); + intern = Z_XPATHOBJ_P(ZEND_THIS); if (intern != NULL) { oldctx = (xmlXPathContextPtr)intern->dom.ptr; if (oldctx != NULL) { @@ -315,7 +315,7 @@ PHP_FUNCTION(dom_xpath_register_ns) dom_xpath_object *intern; unsigned char *prefix, *ns_uri; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { return; } @@ -358,7 +358,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ xmlNsPtr *ns = NULL; zend_bool register_node_ns = 1; - id = &EX(This); + id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|O!b", &expr, &expr_len, &context, dom_node_class_entry, ®ister_node_ns) == FAILURE) { return; } |