CURLOPT_FTP_FILEMETHOD.md drop cast, add note to history

This commit is contained in:
Viktor Szakats 2025-08-01 13:27:07 +02:00
parent d629d53e8c
commit ccabfeb15c
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -68,8 +68,7 @@ int main(void)
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD,
(long)CURLFTPMETHOD_SINGLECWD);
curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD);
res = curl_easy_perform(curl);
@ -78,6 +77,11 @@ int main(void)
}
~~~
# HISTORY
CURLFTPMETHOD_\* 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