Skip to content

Commit 5427120

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix naming clash with libxml macro
2 parents 569b003 + 8774e96 commit 5427120

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ext/dom/attr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ PHP_METHOD(DOMAttr, isId)
201201

202202
bool dom_compare_value(const xmlAttr *attr, const xmlChar *value)
203203
{
204-
bool free;
205-
xmlChar *attr_value = php_libxml_attr_value(attr, &free);
204+
bool should_free;
205+
xmlChar *attr_value = php_libxml_attr_value(attr, &should_free);
206206
bool result = xmlStrEqual(attr_value, value);
207-
if (free) {
207+
if (should_free) {
208208
xmlFree(attr_value);
209209
}
210210
return result;

ext/dom/php_dom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,10 +2333,10 @@ void php_dom_get_content_into_zval(const xmlNode *nodep, zval *return_value, boo
23332333
}
23342334

23352335
case XML_ATTRIBUTE_NODE: {
2336-
bool free;
2337-
xmlChar *value = php_libxml_attr_value((const xmlAttr *) nodep, &free);
2336+
bool should_free;
2337+
xmlChar *value = php_libxml_attr_value((const xmlAttr *) nodep, &should_free);
23382338
RETVAL_STRING_FAST((const char *) value);
2339-
if (free) {
2339+
if (should_free) {
23402340
xmlFree(value);
23412341
}
23422342
return;

ext/simplexml/simplexml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,10 +1528,10 @@ static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node,
15281528
/* Attributes in the xmlns namespace should be treated as namespace declarations too. */
15291529
if (attr->ns && xmlStrEqual(attr->ns->href, (const xmlChar *) "http://www.w3.org/2000/xmlns/")) {
15301530
const char *prefix = attr->ns->prefix ? (const char *) attr->name : "";
1531-
bool free;
1532-
xmlChar *href = php_libxml_attr_value(attr, &free);
1531+
bool should_free;
1532+
xmlChar *href = php_libxml_attr_value(attr, &should_free);
15331533
sxe_add_namespace_name_raw(return_value, prefix, (const char *) href);
1534-
if (free) {
1534+
if (should_free) {
15351535
xmlFree(href);
15361536
}
15371537
}

0 commit comments

Comments
 (0)