CURLOPT: bump CURLFTP* enums to long, drop casts#17797
Closed
vszakats wants to merge 10 commits intocurl:masterfrom
Closed
CURLOPT: bump CURLFTP* enums to long, drop casts#17797vszakats wants to merge 10 commits intocurl:masterfrom
CURLFTP* enums to long, drop casts#17797vszakats wants to merge 10 commits intocurl:masterfrom
Conversation
391db8f to
60eaccf
Compare
long
b831eae to
63101fe
Compare
longlong, drop casts
bagder
reviewed
Jul 1, 2025
| CURLFTP_CREATE_DIR_NONE, | ||
| CURLFTP_CREATE_DIR, | ||
| CURLFTP_CREATE_DIR_RETRY | ||
| } curl_ftpcreatedir; |
Member
There was a problem hiding this comment.
I think the enums still need to be provided, as they have been offered in the header for a long while there is a significant change/risk that there are users using this publicly provided type in source code now.
Member
Author
There was a problem hiding this comment.
I kept the enums in curl/curl.h.
This is a copy in the docs, synced with the updated header.
There is a similar copy case in CURLOPT_HSTS_CTRL,
out of sync with curl/curl.h, ref #17791.
It'd seem safe to delete such copies from the docs, since the
macros are described in the texts anyway. What do you think?
Contributor
|
FWIW, you can force an enum to be long in C23 (so with gcc >=15) with the syntax |
63101fe to
87d9461
Compare
87d9461 to
2985b55
Compare
bagder
reviewed
Jul 28, 2025
long, drop castsCURLFTP* enums to long, drop casts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch bumps the size of these constants from
inttolong, whilekeeping their actual values the same. It may cause incompatibilities in
user code, requiring the bump of holder variables and/or adding casts:
Also:
to older curl versions as well.