diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-11-14 02:44:25 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-11-14 02:44:25 +0300 |
commit | c6ad0b92b7d8e66a07cf75ed4abc39fe3e13e00d (patch) | |
tree | 7bee04b4a982731b930fce3fef7017c442d46fb0 /ext/simplexml/simplexml.c | |
parent | 6bb94eacd72499b62bf636d1338ba0b77cdf1671 (diff) | |
download | php-git-c6ad0b92b7d8e66a07cf75ed4abc39fe3e13e00d.tar.gz |
Replace getThis() by EX(This), when additional check is not necessary.
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r-- | ext/simplexml/simplexml.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index ab394b5c83..37dc604d51 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1293,7 +1293,7 @@ SXE_METHOD(xpath) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); if (sxe->iter.type == SXE_ITER_ATTRLIST) { return; /* attributes don't have attributes */ @@ -1378,7 +1378,7 @@ SXE_METHOD(registerXPathNamespace) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); if (!sxe->xpath) { sxe->xpath = xmlXPathNewContext((xmlDocPtr) sxe->document->ptr); } @@ -1412,7 +1412,7 @@ SXE_METHOD(asXML) RETURN_FALSE; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); @@ -1441,7 +1441,7 @@ SXE_METHOD(asXML) } } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); @@ -1543,7 +1543,7 @@ SXE_METHOD(getNamespaces) array_init(return_value); - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); @@ -1590,7 +1590,7 @@ SXE_METHOD(getDocNamespaces) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); if(from_root){ node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); }else{ @@ -1620,7 +1620,7 @@ SXE_METHOD(children) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); if (sxe->iter.type == SXE_ITER_ATTRLIST) { return; /* attributes don't have attributes */ @@ -1642,7 +1642,7 @@ SXE_METHOD(getName) xmlNodePtr node; int namelen; - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); @@ -1669,7 +1669,7 @@ SXE_METHOD(attributes) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -1703,7 +1703,7 @@ SXE_METHOD(addChild) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -1769,7 +1769,7 @@ SXE_METHOD(addAttribute) return; } - sxe = Z_SXEOBJ_P(getThis()); + sxe = Z_SXEOBJ_P(&EX(This)); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); @@ -1921,7 +1921,7 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type) Returns the string content */ SXE_METHOD(__toString) { - if (sxe_object_cast_ex(getThis(), return_value, IS_STRING) != SUCCESS) { + if (sxe_object_cast_ex(&EX(This), return_value, IS_STRING) != SUCCESS) { zval_ptr_dtor(return_value); RETURN_EMPTY_STRING(); } @@ -1978,7 +1978,7 @@ static int sxe_count_elements(zval *object, zend_long *count) /* {{{ */ SXE_METHOD(count) { zend_long count = 0; - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); if (zend_parse_parameters_none() == FAILURE) { return; @@ -2255,7 +2255,7 @@ PHP_FUNCTION(simplexml_load_string) SimpleXMLElement constructor */ SXE_METHOD(__construct) { - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); char *data, *ns = NULL; size_t data_len, ns_len = 0; xmlDocPtr docp; |