curl-library
[PATCH 4/4] lib/url.c: Generic read/write data pointers
From: Alexander Klauer <Alexander.Klauer_at_itwm.fraunhofer.de>
Date: Wed, 20 Feb 2013 12:37:29 +0100
Date: Wed, 20 Feb 2013 12:37:29 +0100
Always interprets the pointer passed with the CURLOPT_WRITEDATA or
CURLOPT_READDATA options of curl_easy_setopt() as a void pointer in
order to avoid problems in environments where FILE and void pointers
have different sizes.
--- lib/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/url.c b/lib/url.c index f9ce3ce..62fb853 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1396,7 +1396,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* * FILE pointer to write to or include in the data write callback */ - data->set.out = va_arg(param, FILE *); + data->set.out = va_arg(param, void *); break; case CURLOPT_FTPPORT: /* @@ -1437,7 +1437,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, * FILE pointer to read the file to be uploaded from. Or possibly * used as argument to the read callback. */ - data->set.in = va_arg(param, FILE *); + data->set.in = va_arg(param, void *); break; case CURLOPT_INFILESIZE: /* -- 1.7.9.5 --------------060907010407000508070505 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html --------------060907010407000508070505--Received on 2001-09-17