Skip to content

Adjust examples and tests which use CURLOPT_READFUNCTION#6392

Closed
olafhering wants to merge 1 commit into
curl:masterfrom
olafhering:CURLOPT_READFUNCTION
Closed

Adjust examples and tests which use CURLOPT_READFUNCTION#6392
olafhering wants to merge 1 commit into
curl:masterfrom
olafhering:CURLOPT_READFUNCTION

Conversation

@olafhering

Copy link
Copy Markdown
Contributor

The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering olaf@aepfle.de

@olafhering

Copy link
Copy Markdown
Contributor Author

Bad examples lead to bad code, as discussed in anonbeat/guayadeque#113

@bagder

bagder commented Dec 30, 2020

Copy link
Copy Markdown
Member

I don't understand how the examples caused any bad code. Can you elaborate? Neither kind of pointer implies that the data is null-terminated and the docs is very clear on the fact that for the write callback the data is not null-terminated.

The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
@bagder bagder closed this in f2ed79d Dec 30, 2020
@bagder

bagder commented Dec 30, 2020

Copy link
Copy Markdown
Member

Thanks!

@olafhering olafhering deleted the CURLOPT_READFUNCTION branch December 30, 2020 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants