Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
missing const in prototypes
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Patrick Monnerat via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 23 Nov 2025 16:01:06 +0100
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
Date: Sun, 23 Nov 2025 16:01:06 +0100
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.htmlReceived on 2025-11-23