Skip to content

Commit 6dc0dcc

Browse files
committed
uri: Fix const-correctness violation in uri_*_from_obj
The functions derived non-const pointers from a const-pointer, which is not correct. Since php#19854 no `const` pointers are passed into these functions, so we can just make the parameter non-const.
1 parent 5c6f25b commit 6dc0dcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/uri/php_uri_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ typedef struct uri_object_t {
147147
zend_object std;
148148
} uri_object_t;
149149

150-
static inline uri_object_t *uri_object_from_obj(const zend_object *object) {
150+
static inline uri_object_t *uri_object_from_obj(zend_object *object) {
151151
return (uri_object_t*)((char*)(object) - XtOffsetOf(uri_object_t, std));
152152
}
153153

154-
static inline uri_internal_t *uri_internal_from_obj(const zend_object *object) {
154+
static inline uri_internal_t *uri_internal_from_obj(zend_object *object) {
155155
return &(uri_object_from_obj(object)->internal);
156156
}
157157

0 commit comments

Comments
 (0)