On Sun, 8 Jul 2012, Joe Mason wrote:
Well, I don't think your idea here is bad but I'm bit reluctant to change
details in this area as I am convinced there are existing applications in
the wild that set things to NULL in various combinations already to get the
functionality of existing libcurl. So keeping the existing ABI is more
important than introducing a very small short-cut to future applications I
think...
If I'm reading this right, currently if you set CURLOPT_WRITEDATA to NULL
without setting CURLOPT_WRITEFUNCTION, curl crashes. How can an existing
app be depending on that?
Heh, yeah that struck me as well after I sent that mail... I clearly didn't
think that through all the way! =)
The question is if we want to make CURLOPT_WRITEDATA set to NULL with
CURLOPT_WRITEFUNCTION unset or set to NULL equal a callback that just return
the number of bytes it gets. As we can clearly do that without breaking
anything, as doing that with a current libcurl will just get you a crash...
It seems like a very small use case for another special case in the code that
isn't very easy guessable. Or what do others think? Am I just being grumpy?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html