You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 avoid *
in its example callback method.I want to use
char *
in my callback method to avoid having to cast the first parameter tochar *
. But I cannot be sure from the documentation whether this pointer is achar *
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 usevoid *
, so there is consistency and clarity.Thank you.
curl/libcurl version
curl 8.7.1
operating system
Windows 10 64-bit
The text was updated successfully, but these errors were encountered: