mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:01:41 +03:00
fixup hide the typecasts by providing private defines for unsigned
This commit is contained in:
parent
9020b448ed
commit
f48ae36221
2 changed files with 6 additions and 3 deletions
|
|
@ -37,4 +37,7 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
|
|||
bool has_scheme);
|
||||
#endif
|
||||
|
||||
#define U_CURLU_URLDECODE (unsigned int)CURLU_URLDECODE
|
||||
#define U_CURLU_PATH_AS_IS (unsigned int)CURLU_PATH_AS_IS
|
||||
|
||||
#endif /* HEADER_CURL_URLAPI_INT_H */
|
||||
|
|
|
|||
|
|
@ -1274,7 +1274,7 @@ static CURLUcode redirect_url(const char *base, const char *relurl,
|
|||
if(!curlx_dyn_addn(&urlbuf, base, prelen) &&
|
||||
!urlencode_str(&urlbuf, useurl, strlen(useurl), !host_changed, FALSE)) {
|
||||
uc = parseurl_and_replace(curlx_dyn_ptr(&urlbuf), u,
|
||||
flags & ~(unsigned int)CURLU_PATH_AS_IS);
|
||||
flags & ~U_CURLU_PATH_AS_IS);
|
||||
}
|
||||
else
|
||||
uc = CURLUE_OUT_OF_MEMORY;
|
||||
|
|
@ -1555,7 +1555,7 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
case CURLUPART_SCHEME:
|
||||
ptr = u->scheme;
|
||||
ifmissing = CURLUE_NO_SCHEME;
|
||||
flags &= ~(unsigned int)CURLU_URLDECODE; /* never for schemes */
|
||||
flags &= ~U_CURLU_URLDECODE; /* never for schemes */
|
||||
if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
|
||||
return CURLUE_NO_SCHEME;
|
||||
break;
|
||||
|
|
@ -1582,7 +1582,7 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
case CURLUPART_PORT:
|
||||
ptr = u->port;
|
||||
ifmissing = CURLUE_NO_PORT;
|
||||
flags &= ~(unsigned int)CURLU_URLDECODE; /* never for port */
|
||||
flags &= ~ U_CURLU_URLDECODE; /* never for port */
|
||||
if(!ptr && (flags & CURLU_DEFAULT_PORT) && u->scheme) {
|
||||
/* there is no stored port number, but asked to deliver
|
||||
a default one for the scheme */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue