aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-04-07 11:47:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-04-07 11:47:21 +0000
commit4d33cf739da2649d3a8c363572cdb386b0f743b9 (patch)
treebd35fc721470dd988f942192b40d2bb2f2580bd1 /lib/urldata.h
parent34e7daf989a32acfb686bfc627c7e42eb6769242 (diff)
added typedefed function pointers and typecast the NULL assignments in an
attempt to silence picky compilers when assigning data pointers to a function pointer variable
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 1d6bab2a0..6843925e0 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -541,6 +541,12 @@ struct Curl_async {
#define FIRSTSOCKET 0
#define SECONDARYSOCKET 1
+/* These function pointer types are here only to allow easier typecasting
+ within the source when we need to cast between data pointers (such as NULL)
+ and function pointers. */
+typedef CURLcode (*Curl_do_more_func)(struct connectdata *);
+typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode);
+
/*
* The connectdata struct contains all fields and variables that should be
* unique for an entire connection.
@@ -625,13 +631,13 @@ struct connectdata {
/* These two functions MUST be set by the curl_connect() function to be
be protocol dependent */
CURLcode (*curl_do)(struct connectdata *, bool *done);
- CURLcode (*curl_done)(struct connectdata *, CURLcode);
+ Curl_done_func curl_done;
/* If the curl_do() function is better made in two halves, this
* curl_do_more() function will be called afterwards, if set. For example
* for doing the FTP stuff after the PASV/PORT command.
*/
- CURLcode (*curl_do_more)(struct connectdata *);
+ Curl_do_more_func curl_do_more;
/* This function *MAY* be set to a protocol-dependent function that is run
* after the connect() and everything is done, as a step in the connection.