aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Klauer <Alexander.Klauer@itwm.fraunhofer.de>2013-02-22 13:06:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-22 23:22:21 +0100
commita5b231acc2eae660fb304fdc4c71c7a3818b23ff (patch)
tree9677f93c15979c4ce00703ad43a8b9428f0c1360
parent790abe3fbe31f1596100d955f04d45c1aa898b0c (diff)
lib/url.c: Generic read/write data pointers
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 non-trivial conversion.
-rw-r--r--lib/url.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index f9ce3ce0b..cbe0f4659 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1394,9 +1394,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_FILE:
/*
- * FILE pointer to write to or include in the data write callback
+ * FILE pointer to write to. Or possibly
+ * used as argument to the write callback.
*/
- data->set.out = va_arg(param, FILE *);
+ data->set.out = va_arg(param, void *);
break;
case CURLOPT_FTPPORT:
/*
@@ -1437,7 +1438,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:
/*