mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
uri: Fix const-correctness violation in uri_*_from_obj (#19907)
The functions derived non-const pointers from a const-pointer, which is not correct. Since php/php-src#19854 no `const` pointers are passed into these functions, so we can just make the parameter non-const.
This commit is contained in:
@@ -147,11 +147,11 @@ typedef struct uri_object_t {
|
||||
zend_object std;
|
||||
} uri_object_t;
|
||||
|
||||
static inline uri_object_t *uri_object_from_obj(const zend_object *object) {
|
||||
static inline uri_object_t *uri_object_from_obj(zend_object *object) {
|
||||
return (uri_object_t*)((char*)(object) - XtOffsetOf(uri_object_t, std));
|
||||
}
|
||||
|
||||
static inline uri_internal_t *uri_internal_from_obj(const zend_object *object) {
|
||||
static inline uri_internal_t *uri_internal_from_obj(zend_object *object) {
|
||||
return &(uri_object_from_obj(object)->internal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user