cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: help with multi and write_data()

From: Philippe Raoult <phir_at_gcu-squad.org>
Date: Thu, 13 Mar 2003 08:09:01 +0100

On Thu, 13 Mar 2003 07:08:10 +0100 (CET)
Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Wed, 12 Mar 2003, Jacob Hallenborg wrote:
>
> > size_t write_data(void *buffer, size_t size, size_t nmemb, void
> > *stream);
>
> Seeing you're writing a C++ program, surely you will need to use 'extern
> "C"{' stuff around the callback function? Otherwise your function will
> get confused when called without the 'this' pointer...

erm daniel C++ functions dont take "this" pointers, only class methods. And
you only need extern "C" {} when you need to link C and C++ code (it's a
name resolving issue). With his code it should work, as curl gets a
function pointer.

Cheers,
Philippe

-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Received on 2003-03-13