From 0cb3f9a3e2de5bd424f904f7610ba3af380e362b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 21 Aug 2025 23:12:28 +0200 Subject: [PATCH] uri: Improve return type of `uriparser_parse_uri_ex()` (#19540) This function is not intended to be called via a function pointer, so we don't need to deal with a generic `void*`. --- ext/uri/uri_parser_rfc3986.c | 2 +- ext/uri/uri_parser_rfc3986.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/uri/uri_parser_rfc3986.c b/ext/uri/uri_parser_rfc3986.c index 963eb210dfd..067df9dc822 100644 --- a/ext/uri/uri_parser_rfc3986.c +++ b/ext/uri/uri_parser_rfc3986.c @@ -283,7 +283,7 @@ static uriparser_uris_t *uriparser_create_uris(void) return uriparser_uris; } -void *uriparser_parse_uri_ex(const char *uri_str, size_t uri_str_len, const uriparser_uris_t *uriparser_base_urls, bool silent) +uriparser_uris_t *uriparser_parse_uri_ex(const char *uri_str, size_t uri_str_len, const uriparser_uris_t *uriparser_base_urls, bool silent) { UriUriA uri = {0}; diff --git a/ext/uri/uri_parser_rfc3986.h b/ext/uri/uri_parser_rfc3986.h index 1baf80c2f08..e15cf803ecc 100644 --- a/ext/uri/uri_parser_rfc3986.h +++ b/ext/uri/uri_parser_rfc3986.h @@ -30,6 +30,6 @@ typedef struct uriparser_uris_t { zend_result uriparser_read_userinfo(const uri_internal_t *internal_uri, uri_component_read_mode_t read_mode, zval *retval); -void *uriparser_parse_uri_ex(const char *uri_str, size_t uri_str_len, const uriparser_uris_t *uriparser_base_url, bool silent); +uriparser_uris_t *uriparser_parse_uri_ex(const char *uri_str, size_t uri_str_len, const uriparser_uris_t *uriparser_base_url, bool silent); #endif