diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:30:54 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:33:06 +0100 |
commit | 3e01f5afb1b52fe26a956190296de0192eedeec1 (patch) | |
tree | 77531ec93e3f3cef9891c77b5ca553eb8487f121 /ext/dom | |
parent | e2c8ab7c33ac5328485c43db5080c5bf4911ce38 (diff) | |
download | php-git-3e01f5afb1b52fe26a956190296de0192eedeec1.tar.gz |
Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
Diffstat (limited to 'ext/dom')
-rw-r--r-- | ext/dom/document.c | 2 | ||||
-rw-r--r-- | ext/dom/dom_iterators.c | 2 | ||||
-rw-r--r-- | ext/dom/element.c | 8 | ||||
-rw-r--r-- | ext/dom/node.c | 4 | ||||
-rw-r--r-- | ext/dom/php_dom.c | 6 | ||||
-rw-r--r-- | ext/dom/xml_common.h | 2 | ||||
-rw-r--r-- | ext/dom/xpath.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index c6d0f723f8..0689057cde 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -795,7 +795,7 @@ PHP_METHOD(DOMDocument, importNode) xmlNodePtr nodep, retnodep; dom_object *intern, *nodeobj; int ret; - zend_bool recursive = 0; + bool recursive = 0; /* See http://www.xmlsoft.org/html/libxml-tree.html#xmlDocCopyNode for meaning of values */ int extended_recursive; diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index f56d249034..c3fbb356e4 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -182,7 +182,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ int previndex=0; HashTable *nodeht; zval *entry; - zend_bool do_curobj_undef = 1; + bool do_curobj_undef = 1; php_dom_iterator *iterator = (php_dom_iterator *)iter; diff --git a/ext/dom/element.c b/ext/dom/element.c index 317619001b..ba67f83d69 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -1014,7 +1014,7 @@ PHP_METHOD(DOMElement, hasAttributeNS) } /* }}} end dom_element_has_attribute_ns */ -static void php_set_attribute_id(xmlAttrPtr attrp, zend_bool is_id) /* {{{ */ +static void php_set_attribute_id(xmlAttrPtr attrp, bool is_id) /* {{{ */ { if (is_id == 1 && attrp->atype != XML_ATTRIBUTE_ID) { xmlChar *id_val; @@ -1044,7 +1044,7 @@ PHP_METHOD(DOMElement, setIdAttribute) dom_object *intern; char *name; size_t name_len; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sb", &name, &name_len, &is_id) == FAILURE) { @@ -1080,7 +1080,7 @@ PHP_METHOD(DOMElement, setIdAttributeNS) dom_object *intern; size_t uri_len, name_len; char *uri, *name; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { @@ -1114,7 +1114,7 @@ PHP_METHOD(DOMElement, setIdAttributeNode) xmlNode *nodep; xmlAttrPtr attrp; dom_object *intern, *attrobj; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &node, dom_attr_class_entry, &is_id) == FAILURE) { diff --git a/ext/dom/node.c b/ext/dom/node.c index a6f88b5c0f..34dc5c76d2 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1271,7 +1271,7 @@ PHP_METHOD(DOMNode, cloneNode) xmlNode *n, *node; int ret; dom_object *intern; - zend_bool recursive = 0; + bool recursive = 0; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &recursive) == FAILURE) { @@ -1543,7 +1543,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlDocPtr docp; xmlNodeSetPtr nodeset = NULL; dom_object *intern; - zend_bool exclusive=0, with_comments=0; + bool exclusive=0, with_comments=0; xmlChar **inclusive_ns_prefixes = NULL; char *file = NULL; int ret = -1; diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 78d22f6a5e..e8d75d5999 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1125,7 +1125,7 @@ void php_dom_create_iterator(zval *return_value, int ce_type) /* {{{ */ /* }}} */ /* {{{ php_dom_create_object */ -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) { zend_class_entry *ce; dom_object *intern; @@ -1301,10 +1301,10 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l /* }}} */ /* }}} end dom_element_get_elements_by_tag_name_ns_raw */ -static inline zend_bool is_empty_node(xmlNodePtr nodep) +static inline bool is_empty_node(xmlNodePtr nodep) { xmlChar *strContent = xmlNodeGetContent(nodep); - zend_bool ret = strContent == NULL || *strContent == '\0'; + bool ret = strContent == NULL || *strContent == '\0'; xmlFree(strContent); return ret; } diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 40548c2d1a..671710e2e8 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -53,7 +53,7 @@ static inline dom_object *php_dom_obj_from_obj(zend_object *obj) { PHP_DOM_EXPORT extern zend_class_entry *dom_node_class_entry; PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj); -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); #define DOM_XMLNS_NAMESPACE \ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 1f97601c42..6ea3533188 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -208,7 +208,7 @@ static void dom_xpath_ext_function_object_php(xmlXPathParserContextPtr ctxt, int PHP_METHOD(DOMXPath, __construct) { zval *doc; - zend_bool register_node_ns = 1; + bool register_node_ns = 1; xmlDocPtr docp = NULL; dom_object *docobj; dom_xpath_object *intern; @@ -335,7 +335,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ char *expr; xmlDoc *docp = NULL; xmlNsPtr *ns = NULL; - zend_bool register_node_ns; + bool register_node_ns; id = ZEND_THIS; intern = Z_XPATHOBJ_P(id); |