Commit ac1e1ded773 for php.net
commit ac1e1ded773813a7fd37d5c6bd9b46badbf34df3
Author: Gina Peter Banyard <girgias@php.net>
Date: Thu Jul 2 23:12:08 2026 +0100
ext/soap: use bool type instead of int type in php_xml.c
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index d5daaef1598..a4c638410a7 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -148,7 +148,7 @@ xmlNsPtr node_find_ns(xmlNodePtr node)
}
}
-int attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns)
+bool attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns)
{
if (node->name && strcmp((const char *) node->name, name) == 0) {
xmlNsPtr nsPtr = node->ns;
@@ -156,17 +156,17 @@ int attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns)
if (nsPtr) {
return (strcmp((const char *) nsPtr->href, ns) == 0);
} else {
- return FALSE;
+ return false;
}
} else if (nsPtr) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
+bool node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
{
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
if (ns) {
@@ -174,29 +174,29 @@ int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
if (nsPtr) {
return strcmp((const char *) nsPtr->href, ns) == 0;
} else {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-int node_is_equal_ex_one_of(xmlNodePtr node, const char *name, const char *const *namespaces)
+bool node_is_equal_ex_one_of(xmlNodePtr node, const char *name, const char *const *namespaces)
{
if ((node->name) && strcmp((char*)node->name, name) == 0) {
xmlNsPtr nsPtr = node_find_ns(node);
if (nsPtr) {
do {
if (strcmp((const char *) nsPtr->href, *namespaces) == 0) {
- return TRUE;
+ return true;
}
namespaces++;
} while (*namespaces != NULL);
}
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
xmlAttrPtr get_attribute_any_ns(xmlAttrPtr node, const char *name)
diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h
index 4a6d76427dd..d87f4a75874 100644
--- a/ext/soap/php_xml.h
+++ b/ext/soap/php_xml.h
@@ -29,9 +29,9 @@ xmlDocPtr soap_xmlParseFile(const char *filename);
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t size);
xmlNsPtr node_find_ns(xmlNodePtr node);
-int attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns);
-int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns);
-int node_is_equal_ex_one_of(xmlNodePtr node, const char *name, const char *const *namespaces);
+bool attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns);
+bool node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns);
+bool node_is_equal_ex_one_of(xmlNodePtr node, const char *name, const char *const *namespaces);
xmlAttrPtr get_attribute_any_ns(xmlAttrPtr node, const char *name);
xmlAttrPtr get_attribute_ex(xmlAttrPtr node, const char *name, const char *ns);
xmlNodePtr get_node_ex(xmlNodePtr node, const char *name, const char *ns);