missing const in prototypes
Patrick Monnerat via curl-library <[email protected]> Sun, 23 Nov 2025 16:01:06 +0100
| Newsgroups | gmane.comp.web.curl.library |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody, I'm aware changing our prototype definitions may cause existing programs to fail compilation, but I wonder if it is intentional we do not have const in the following declarations (upper case CONST added to show where): *CONST* char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header) *CONST* char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num) CURLUcode curl_url_get(const CURLU *u, CURLUPart what, *CONST* char **part, unsigned int flags) In case we do not want to change them, why not saying in docs they should be treated as such ? Another such case is the *data* field in struct *curl_slist*. There may be others, probably. Thanks for giving an explanation and your opinion. Patrick -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html