Skip to content

CURLOPT_WRITEFUNCTION documentation inconsistency #13681

Description

@Mike4Online

I did this

Reviewed the documentation for libCURL API function CURLOPT_WRITEFUNCTION - specifically the method signature in the Synopsis and in the example code.

I expected the following

I expected the documented method signature in the Synopsis to correspond with what is in the example code on the same page, but they do not match. Specifically, the documented method signature in the Synopsis specifies a char * for the first parameter, but the example code specifies a void * in its example callback method.

I want to use char * in my callback method to avoid having to cast the first parameter to char *. But I cannot be sure from the documentation whether this pointer is a char * to begin with or not.

Either the example should be changed to use char * for the first parameter in its callback function, or the specified method signature in the Synopsis should be changed to use void *, so there is consistency and clarity.

Thank you.

curl/libcurl version

curl 8.7.1

operating system

Windows 10 64-bit

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions