cURL Mailing List Monthly Index Single Mail
curl-users Mailing List Archives
Re: Mistake in user guide documentation regarding C++(lib-curl-the-guide)
"Nye, Jason" <jnye_at_osii.com> said:
> The statement saying "The callbacks must be Plain C" should be replaced
> with "The callbacks CANNOT be non-static class member functions". The
> discussion about extern "C" is all wrong. All extern "C" does is prevent
> name mangling and has nothing to do with the this pointer or how
> function pointers at runtime are interpreted.
What was meant was probably that the callback must be 'cdecl'.
Since libcurl probably cannot be compiled with MSVC and 'fastcall'
globally, all user-callbacks must also be 'cdecl'
But the callbacks should IMHO be decorated correctly.
In <curl/curl.h> do something like:
typedef size_t (__cdecl *curl_write_callback)(char *buffer,
Received on 2004-07-12
These mail archives are generated by hypermail.
Page updated November 12, 2010.
File upload with ASP.NET
web site info