aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/share.c2
-rw-r--r--lib/share.h15
-rw-r--r--lib/url.c5
-rw-r--r--lib/urldata.h2
4 files changed, 18 insertions, 6 deletions
diff --git a/lib/share.c b/lib/share.c
index 14bbae0cb..f0203f1a9 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -44,7 +44,7 @@
#define CURL_SHARE_GET(__handle) (((struct SessionHandle *) (__handle))->share)
-curl_share *
+CURLSH *
curl_share_init (void)
{
curl_share *share = (curl_share *) malloc (sizeof (curl_share));
diff --git a/lib/share.h b/lib/share.h
index c373c3ccf..75a32961f 100644
--- a/lib/share.h
+++ b/lib/share.h
@@ -34,8 +34,19 @@ typedef enum {
SHARE_ERROR_LAST
} Curl_share_error;
-Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_type);
-Curl_share_error Curl_share_release_lock (CURL *, curl_lock_type);
+/* this struct is libcurl-private, don't export details */
+struct Curl_share {
+ unsigned int specifier;
+ unsigned int locked;
+ unsigned int dirty;
+
+ curl_lock_function lockfunc;
+ curl_unlock_function unlockfunc;
+ void *clientdata;
+};
+
+Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_data);
+Curl_share_error Curl_share_release_lock (CURL *, curl_lock_data);
#endif /* __CURL_SHARE_H */
diff --git a/lib/url.c b/lib/url.c
index 7f2aae8a5..d085f3ce4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -101,6 +101,7 @@
#include "strequal.h"
#include "escape.h"
#include "strtok.h"
+#include "share.h"
/* And now for the protocols */
#include "ftp.h"
@@ -1071,8 +1072,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
case CURLOPT_SHARE:
{
- curl_share *set;
- set = va_arg(param, curl_share *);
+ struct Curl_share *set;
+ set = va_arg(param, struct Curl_share *);
if(data->share)
data->share->dirty--;
diff --git a/lib/urldata.h b/lib/urldata.h
index cb6cbee1b..153825d4b 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -765,7 +765,7 @@ struct UserDefined {
struct SessionHandle {
curl_hash *hostcache;
- curl_share *share; /* Share, handles global variable mutexing */
+ struct Curl_share *share; /* Share, handles global variable mutexing */
struct UserDefined set; /* values set by the libcurl user */
struct DynamicStatic change; /* possibly modified userdefined data */