Skip to content

Commit 78ec2bd

Browse files
authored
Respect constness in casting in dom/entity.c (#14080)
1 parent d24a04b commit 78ec2bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/dom/entity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ zend_result dom_entity_public_id_read(dom_object *obj, zval *retval)
4444
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY || !nodep->ExternalID) {
4545
ZVAL_NULL(retval);
4646
} else {
47-
ZVAL_STRING(retval, (char *) (nodep->ExternalID));
47+
ZVAL_STRING(retval, (const char *) nodep->ExternalID);
4848
}
4949

5050
return SUCCESS;
@@ -64,7 +64,7 @@ zend_result dom_entity_system_id_read(dom_object *obj, zval *retval)
6464
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
6565
ZVAL_NULL(retval);
6666
} else {
67-
ZVAL_STRING(retval, (char *) (nodep->SystemID));
67+
ZVAL_STRING(retval, (const char *) nodep->SystemID);
6868
}
6969

7070
return SUCCESS;

0 commit comments

Comments
 (0)