summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-08-15 06:51:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-08-15 06:51:37 +0000
commit2a6e1ea83c0bd61deb10dd611a232c5096914267 (patch)
tree603fbbcadbc6617b04c81b0743c64b456a5bea36
parentea6d35d97395e7e5dbb1035c5ce058928bc7263b (diff)
downloadgnurl-2a6e1ea83c0bd61deb10dd611a232c5096914267.tar.gz
gnurl-2a6e1ea83c0bd61deb10dd611a232c5096914267.tar.bz2
gnurl-2a6e1ea83c0bd61deb10dd611a232c5096914267.zip
internal functions should not use 'CURL *' as arguments, I replaced them
with the more appropriate 'struct UrlData *' instead.
-rw-r--r--lib/easy.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 8355ed6b3..51c695292 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -74,6 +74,7 @@
#include <curl/curl.h>
#include "transfer.h"
#include "ssluse.h"
+#include "url.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -180,7 +181,7 @@ CURL *curl_easy_init(void)
curl_global_init(CURL_GLOBAL_DEFAULT);
/* We use curl_open() with undefined URL so far */
- res = Curl_open((CURL **)&data);
+ res = Curl_open(&data);
if(res != CURLE_OK)
return NULL;
@@ -229,20 +230,25 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
CURLcode curl_easy_perform(CURL *curl)
{
- return Curl_perform(curl);
+ struct UrlData *data = (struct UrlData *)curl;
+
+ return Curl_perform(data);
}
void curl_easy_cleanup(CURL *curl)
{
- Curl_close(curl);
+ struct UrlData *data = (struct UrlData *)curl;
+ Curl_close(data);
}
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
{
va_list arg;
void *paramp;
+ struct UrlData *data = (struct UrlData *)curl;
+
va_start(arg, info);
paramp = va_arg(arg, void *);
- return Curl_getinfo(curl, info, paramp);
+ return Curl_getinfo(data, info, paramp);
}