From bee5b178bce8603010f76cdcd65b8a31c3b35df0 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 1 Aug 2025 13:09:42 +0200 Subject: [PATCH] CURLOPT_HEADEROPT.md drop cast, add note to history --- docs/libcurl/opts/CURLOPT_HEADEROPT.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.md b/docs/libcurl/opts/CURLOPT_HEADEROPT.md index 090781042c..56d205689f 100644 --- a/docs/libcurl/opts/CURLOPT_HEADEROPT.md +++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.md @@ -65,7 +65,7 @@ int main(void) /* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell libcurl to not send the custom headers to the proxy. Keep them separate. */ - curl_easy_setopt(curl, CURLOPT_HEADEROPT, (long)CURLHEADER_SEPARATE); + curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); ret = curl_easy_perform(curl); curl_slist_free_all(list); curl_easy_cleanup(curl); @@ -73,6 +73,11 @@ int main(void) } ~~~ +# HISTORY + +CURLHEADER_\* macros 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