On Thu, Aug 5, 2010, Daniel Stenberg wrote:
> On Thu, 5 Aug 2010, Hrishikesh Murukkathampoondi wrote:

>> I guess the CURL handle should be packaged as an argument into the
>> callback function somehow.

> You control exactly what is passed into the callbacks' data argument
> so you can pass in the CURL handle and whatever else you need.


Questions like this seem to come up fairly often on here.

The manual describes the read/write/header callback prototypes as:
  size_t function(void *ptr, size_t size, size_t nmemb, void *stream);

I think that might be the cause of some confusion, when new users see
the word "stream" maybe they assume it has to be a FILE pointer.

Would this make things more clear?
  size_t function(void *ptr, size_t size, size_t nmemb, void *user_data);


 - Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to