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 | |
| 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')
| -rw-r--r-- | ext/simplexml/simplexml.c | 28 | ||||
| -rw-r--r-- | ext/simplexml/sxe.c | 14 |
2 files changed, 21 insertions, 21 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; diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c index 181369ffa4..290ae9d849 100644 --- a/ext/simplexml/sxe.c +++ b/ext/simplexml/sxe.c @@ -43,7 +43,7 @@ PHP_METHOD(ce_SimpleXMLIterator, rewind) return; } - php_sxe_rewind_iterator(Z_SXEOBJ_P(getThis())); + php_sxe_rewind_iterator(Z_SXEOBJ_P(&EX(This))); } /* }}} */ @@ -51,7 +51,7 @@ PHP_METHOD(ce_SimpleXMLIterator, rewind) Check whether iteration is valid */ PHP_METHOD(ce_SimpleXMLIterator, valid) { - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); if (zend_parse_parameters_none() == FAILURE) { return; @@ -65,7 +65,7 @@ PHP_METHOD(ce_SimpleXMLIterator, valid) Get current element */ PHP_METHOD(ce_SimpleXMLIterator, current) { - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); zval *data; if (zend_parse_parameters_none() == FAILURE) { @@ -87,7 +87,7 @@ PHP_METHOD(ce_SimpleXMLIterator, key) { xmlNodePtr curnode; php_sxe_object *intern; - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); if (zend_parse_parameters_none() == FAILURE) { return; @@ -115,7 +115,7 @@ PHP_METHOD(ce_SimpleXMLIterator, next) return; } - php_sxe_move_forward_iterator(Z_SXEOBJ_P(getThis())); + php_sxe_move_forward_iterator(Z_SXEOBJ_P(&EX(This))); } /* }}} */ @@ -123,7 +123,7 @@ PHP_METHOD(ce_SimpleXMLIterator, next) Check whether element has children (elements) */ PHP_METHOD(ce_SimpleXMLIterator, hasChildren) { - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); php_sxe_object *child; xmlNodePtr node; @@ -151,7 +151,7 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren) Get child element iterator */ PHP_METHOD(ce_SimpleXMLIterator, getChildren) { - php_sxe_object *sxe = Z_SXEOBJ_P(getThis()); + php_sxe_object *sxe = Z_SXEOBJ_P(&EX(This)); zval *data; if (zend_parse_parameters_none() == FAILURE) { |
