Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust examples and tests which use CURLOPT_READFUNCTION #6392

Closed
wants to merge 1 commit into from

Conversation

@olafhering
Copy link
Contributor

@olafhering olafhering commented Dec 30, 2020

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

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

@olafhering
Copy link
Contributor Author

@olafhering olafhering commented Dec 30, 2020

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

@bagder
Copy link
Member

@bagder bagder commented Dec 30, 2020

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.

@bagder
bagder approved these changes Dec 30, 2020
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
Copy link
Member

@bagder bagder commented Dec 30, 2020

Thanks!

@olafhering olafhering deleted the olafhering:CURLOPT_READFUNCTION branch Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.