]> granicus.if.org Git - curl/commitdiff
updated to use the modified share-types
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jan 2003 15:50:52 +0000 (15:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jan 2003 15:50:52 +0000 (15:50 +0000)
lib/share.c
lib/share.h
lib/url.c
lib/urldata.h

index 14bbae0cb2f79f8328181d67ed2d38062bd7ea39..f0203f1a9735fbecfb046a47207af8df84897fad 100644 (file)
@@ -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));
index c373c3ccfc693423189662f9322eba7f739d9956..75a32961f839fa8621a5e855e97f83e52f88f471 100644 (file)
@@ -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 */
 
index 7f2aae8a5d86157b3defb785f28aae9cf6afd8f0..d085f3ce4f9c8a13f06ab10f5be50a8fa28613e3 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
 #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--;
 
index cb6cbee1bd0a5b8dff03e3d0a2e6a6e86210e4b1..153825d4b839c93d7106e196b5e05c7cd9ac29d7 100644 (file)
@@ -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 */