urlapi: take const args in _dup and _get functions

Closes #10708
This commit is contained in:
rcombs 2023-03-08 02:18:39 -06:00 committed by Daniel Stenberg
parent 95cb7d3166
commit b1d735956f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 5 deletions

View file

@ -1350,7 +1350,7 @@ void curl_url_cleanup(CURLU *u)
} \
} while(0)
CURLU *curl_url_dup(CURLU *in)
CURLU *curl_url_dup(const CURLU *in)
{
struct Curl_URL *u = calloc(sizeof(struct Curl_URL), 1);
if(u) {
@ -1371,10 +1371,10 @@ CURLU *curl_url_dup(CURLU *in)
return NULL;
}
CURLUcode curl_url_get(CURLU *u, CURLUPart what,
CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
char **part, unsigned int flags)
{
char *ptr;
const char *ptr;
CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
char portbuf[7];
bool urldecode = (flags & CURLU_URLDECODE)?1:0;