From 1530bd2b5b0c25f56636d72172770fcebf2c7fc8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 1 Aug 2025 13:11:28 +0200 Subject: [PATCH] CURLOPT_PROXYTYPE.md drop cast, add note to history --- docs/libcurl/opts/CURLOPT_PROXYTYPE.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.md b/docs/libcurl/opts/CURLOPT_PROXYTYPE.md index 4680bbb7cc..c2b8c396ee 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYTYPE.md +++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.md @@ -85,13 +85,18 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080"); /* set the proxy type */ - curl_easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5); + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); ret = curl_easy_perform(curl); curl_easy_cleanup(curl); } } ~~~ +# HISTORY + +CURLPROXY_\* enums became `long` types in 8.16.0, prior to this version +a `long` cast is necessary when passing to curl_easy_setopt(3). + # %AVAILABILITY% # RETURN VALUE