From 80fb94b35dbc88616eac03b24b57c48d007315b3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 1 Aug 2025 13:18:02 +0200 Subject: [PATCH] CURLOPT_ALTSVC.md drop cast, add note to history --- docs/libcurl/opts/CURLOPT_ALTSVC.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC.md b/docs/libcurl/opts/CURLOPT_ALTSVC.md index 14e3f31f92..8bc2bc6b8e 100644 --- a/docs/libcurl/opts/CURLOPT_ALTSVC.md +++ b/docs/libcurl/opts/CURLOPT_ALTSVC.md @@ -60,13 +60,18 @@ int main(void) { CURL *curl = curl_easy_init(); if(curl) { - curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)CURLALTSVC_H1); + curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1); curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt"); curl_easy_perform(curl); } } ~~~ +# HISTORY + +CURLALTSVC_\* macros became `long` types in 8.16.0, prior to this version +a `long` cast is necessary when passing to curl_easy_setopt(3). + # FILE FORMAT A text based file with one line per alt-svc entry and each line consists of