[php-src] master: Respect constness in casting in dom/entity.c (#14080)
| From: | Niels Dossche via GitHub | Date: | Tue, 30 Apr 2024 15:30:01 +0000 |
| Subject: | [php-src] master: Respect constness in casting in dom/entity.c (#14080) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-128268@lists.php.net to get a copy of this message | ||
Author: Niels Dossche (nielsdos)
Committer: GitHub (web-flow)
Pusher: nielsdos
Date: 2024-04-30T17:29:53+02:00
Commit: https://github.com/php/php-src/commit/78ec2bde62ef377ebf06caa0ee53eb01e5df4cbd
Raw diff: https://github.com/php/php-src/commit/78ec2bde62ef377ebf06caa0ee53eb01e5df4cbd.diff
Respect constness in casting in dom/entity.c (#14080)
Changed paths:
M ext/dom/entity.c
Diff:
diff --git a/ext/dom/entity.c b/ext/dom/entity.c
index 95448f5ff2fd..2943e364ed40 100644
--- a/ext/dom/entity.c
+++ b/ext/dom/entity.c
@@ -44,7 +44,7 @@ zend_result dom_entity_public_id_read(dom_object *obj, zval *retval)
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY || !nodep->ExternalID) {
ZVAL_NULL(retval);
} else {
- ZVAL_STRING(retval, (char *) (nodep->ExternalID));
+ ZVAL_STRING(retval, (const char *) nodep->ExternalID);
}
return SUCCESS;
@@ -64,7 +64,7 @@ zend_result dom_entity_system_id_read(dom_object *obj, zval *retval)
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
ZVAL_NULL(retval);
} else {
- ZVAL_STRING(retval, (char *) (nodep->SystemID));
+ ZVAL_STRING(retval, (const char *) nodep->SystemID);
}
return SUCCESS;