Skip to content

Commit 10a5e50

Browse files
committed
Drop SXE_METHOD() macro
Don't break my grep.
1 parent de6e401 commit 10a5e50

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

ext/simplexml/simplexml.c

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void) /* {{{ */
4343
}
4444
/* }}} */
4545

46-
#define SXE_ME(func, arg_info, flags) PHP_ME(simplexml_element, func, arg_info, flags)
47-
#define SXE_MALIAS(func, alias, arg_info, flags) PHP_MALIAS(simplexml_element, func, alias, arg_info, flags)
48-
49-
#define SXE_METHOD(func) PHP_METHOD(SimpleXMLElement, func)
50-
5146
static php_sxe_object* php_sxe_object_new(zend_class_entry *ce, zend_function *fptr_count);
5247
static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data);
5348
static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data);
@@ -1265,7 +1260,7 @@ static int sxe_objects_compare(zval *object1, zval *object2) /* {{{ */
12651260
/* }}} */
12661261

12671262
/* {{{ Runs XPath query on the XML data */
1268-
SXE_METHOD(xpath)
1263+
PHP_METHOD(SimpleXMLElement, xpath)
12691264
{
12701265
php_sxe_object *sxe;
12711266
zval value;
@@ -1353,7 +1348,7 @@ SXE_METHOD(xpath)
13531348
/* }}} */
13541349

13551350
/* {{{ Creates a prefix/ns context for the next XPath query */
1356-
SXE_METHOD(registerXPathNamespace)
1351+
PHP_METHOD(SimpleXMLElement, registerXPathNamespace)
13571352
{
13581353
php_sxe_object *sxe;
13591354
size_t prefix_len, ns_uri_len;
@@ -1382,7 +1377,7 @@ SXE_METHOD(registerXPathNamespace)
13821377
/* }}} */
13831378

13841379
/* {{{ Return a well-formed XML string based on SimpleXML element */
1385-
SXE_METHOD(asXML)
1380+
PHP_METHOD(SimpleXMLElement, asXML)
13861381
{
13871382
php_sxe_object *sxe;
13881383
xmlNodePtr node;
@@ -1507,7 +1502,7 @@ static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recurs
15071502
} /* }}} */
15081503

15091504
/* {{{ Return all namespaces in use */
1510-
SXE_METHOD(getNamespaces)
1505+
PHP_METHOD(SimpleXMLElement, getNamespaces)
15111506
{
15121507
bool recursive = 0;
15131508
php_sxe_object *sxe;
@@ -1555,7 +1550,7 @@ static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node,
15551550
/* }}} */
15561551

15571552
/* {{{ Return all namespaces registered with document */
1558-
SXE_METHOD(getDocNamespaces)
1553+
PHP_METHOD(SimpleXMLElement, getDocNamespaces)
15591554
{
15601555
bool recursive = 0, from_root = 1;
15611556
php_sxe_object *sxe;
@@ -1587,7 +1582,7 @@ SXE_METHOD(getDocNamespaces)
15871582
/* }}} */
15881583

15891584
/* {{{ Finds children of given node */
1590-
SXE_METHOD(children)
1585+
PHP_METHOD(SimpleXMLElement, children)
15911586
{
15921587
php_sxe_object *sxe;
15931588
char *nsprefix = NULL;
@@ -1617,7 +1612,7 @@ SXE_METHOD(children)
16171612
/* }}} */
16181613

16191614
/* {{{ Finds children of given node */
1620-
SXE_METHOD(getName)
1615+
PHP_METHOD(SimpleXMLElement, getName)
16211616
{
16221617
php_sxe_object *sxe;
16231618
xmlNodePtr node;
@@ -1641,7 +1636,7 @@ SXE_METHOD(getName)
16411636
/* }}} */
16421637

16431638
/* {{{ Identifies an element's attributes */
1644-
SXE_METHOD(attributes)
1639+
PHP_METHOD(SimpleXMLElement, attributes)
16451640
{
16461641
php_sxe_object *sxe;
16471642
char *nsprefix = NULL;
@@ -1669,7 +1664,7 @@ SXE_METHOD(attributes)
16691664
/* }}} */
16701665

16711666
/* {{{ Add Element with optional namespace information */
1672-
SXE_METHOD(addChild)
1667+
PHP_METHOD(SimpleXMLElement, addChild)
16731668
{
16741669
php_sxe_object *sxe;
16751670
char *qname, *value = NULL, *nsuri = NULL;
@@ -1733,7 +1728,7 @@ SXE_METHOD(addChild)
17331728
/* }}} */
17341729

17351730
/* {{{ Add Attribute with optional namespace information */
1736-
SXE_METHOD(addAttribute)
1731+
PHP_METHOD(SimpleXMLElement, addAttribute)
17371732
{
17381733
php_sxe_object *sxe;
17391734
char *qname, *value = NULL, *nsuri = NULL;
@@ -1900,7 +1895,7 @@ static int sxe_object_cast(zend_object *readobj, zval *writeobj, int type)
19001895
/* }}} */
19011896

19021897
/* {{{ Returns the string content */
1903-
SXE_METHOD(__toString)
1898+
PHP_METHOD(SimpleXMLElement, __toString)
19041899
{
19051900
if (zend_parse_parameters_none() == FAILURE) {
19061901
RETURN_THROWS();
@@ -1959,7 +1954,7 @@ static int sxe_count_elements(zend_object *object, zend_long *count) /* {{{ */
19591954
/* }}} */
19601955

19611956
/* {{{ Get number of child elements */
1962-
SXE_METHOD(count)
1957+
PHP_METHOD(SimpleXMLElement, count)
19631958
{
19641959
zend_long count = 0;
19651960
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
@@ -1976,7 +1971,7 @@ SXE_METHOD(count)
19761971

19771972

19781973
/* {{{ Rewind to first element */
1979-
SXE_METHOD(rewind)
1974+
PHP_METHOD(SimpleXMLElement, rewind)
19801975
{
19811976
if (zend_parse_parameters_none() == FAILURE) {
19821977
RETURN_THROWS();
@@ -1987,7 +1982,7 @@ SXE_METHOD(rewind)
19871982
/* }}} */
19881983

19891984
/* {{{ Check whether iteration is valid */
1990-
SXE_METHOD(valid)
1985+
PHP_METHOD(SimpleXMLElement, valid)
19911986
{
19921987
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
19931988

@@ -2000,7 +1995,7 @@ SXE_METHOD(valid)
20001995
/* }}} */
20011996

20021997
/* {{{ Get current element */
2003-
SXE_METHOD(current)
1998+
PHP_METHOD(SimpleXMLElement, current)
20041999
{
20052000
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
20062001
zval *data;
@@ -2019,7 +2014,7 @@ SXE_METHOD(current)
20192014
/* }}} */
20202015

20212016
/* {{{ Get name of current child element */
2022-
SXE_METHOD(key)
2017+
PHP_METHOD(SimpleXMLElement, key)
20232018
{
20242019
xmlNodePtr curnode;
20252020
php_sxe_object *intern;
@@ -2044,7 +2039,7 @@ SXE_METHOD(key)
20442039
/* }}} */
20452040

20462041
/* {{{ Move to next element */
2047-
SXE_METHOD(next)
2042+
PHP_METHOD(SimpleXMLElement, next)
20482043
{
20492044
if (zend_parse_parameters_none() == FAILURE) {
20502045
RETURN_THROWS();
@@ -2055,7 +2050,7 @@ SXE_METHOD(next)
20552050
/* }}} */
20562051

20572052
/* {{{ Check whether element has children (elements) */
2058-
SXE_METHOD(hasChildren)
2053+
PHP_METHOD(SimpleXMLElement, hasChildren)
20592054
{
20602055
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
20612056
php_sxe_object *child;
@@ -2082,7 +2077,7 @@ SXE_METHOD(hasChildren)
20822077
/* }}} */
20832078

20842079
/* {{{ Get child element iterator */
2085-
SXE_METHOD(getChildren)
2080+
PHP_METHOD(SimpleXMLElement, getChildren)
20862081
{
20872082
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
20882083
zval *data;
@@ -2354,7 +2349,7 @@ PHP_FUNCTION(simplexml_load_string)
23542349
/* }}} */
23552350

23562351
/* {{{ SimpleXMLElement constructor */
2357-
SXE_METHOD(__construct)
2352+
PHP_METHOD(SimpleXMLElement, __construct)
23582353
{
23592354
php_sxe_object *sxe = Z_SXEOBJ_P(ZEND_THIS);
23602355
char *data, *ns = NULL;

0 commit comments

Comments
 (0)