mirror of
https://github.com/curl/curl.git
synced 2026-04-14 18:21:40 +03:00
docs: use the correct CURLOPT_WRITEFUNCTION signature
In order to not encourage users to use incompatible function pointers, change the callback function definitions to use `char *` instead of `void *` for the first argument. Triggered by https://stackoverflow.com/questions/79921871/curl-c-c-library-based-application-produces-erronious-response-for-http-post-r#comment141032037_79921871 : "The code was mostly modified from [this example code](https://curl.se/libcurl/c/postinmemory.html), honestly I never knew this is wrong. Thanks for pointing it out." Signed-off-by: Ted Lyngmo <ted@lyncon.se> Closes #21265
This commit is contained in:
parent
80b2a5dd37
commit
135665036f
26 changed files with 27 additions and 27 deletions
|
|
@ -80,7 +80,7 @@ static bool is_chain_in_order(struct curl_certinfo *cert_info)
|
|||
return true;
|
||||
}
|
||||
|
||||
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
static size_t wrfu(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
(void)stream;
|
||||
(void)ptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue