]> granicus.if.org Git - curl/commitdiff
headers: forward declare CURL, CURLM and CURLSH as structs
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Jun 2016 12:39:33 +0000 (14:39 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 22 Jun 2016 08:28:36 +0000 (10:28 +0200)
Instead of typedef'ing to void, typedef to their corresponding actual
struct names to allow compilers to type-check.

Assisted-by: Reinhard Max
include/curl/curl.h
include/curl/multi.h

index b9bd8b7067feebce10a56af3c58cc76905c5e350..b91f02ccdecb87c3e4e11b11c3b7057bc8a9c85a 100644 (file)
@@ -91,7 +91,7 @@
 extern "C" {
 #endif
 
-typedef void CURL;
+typedef struct SessionHandle CURL;
 
 /*
  * libcurl external API function linkage decorations.
@@ -2258,7 +2258,7 @@ typedef void (*curl_unlock_function)(CURL *handle,
                                      curl_lock_data data,
                                      void *userptr);
 
-typedef void CURLSH;
+typedef struct Curl_share CURLSH;
 
 typedef enum {
   CURLSHE_OK,  /* all is fine */
index 0fbbd96f09a3b0c2eb23d25e827d38a91173cae0..7a1040f4661a92853db1f4f610b50844dede0f9b 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -52,7 +52,7 @@
 extern "C" {
 #endif
 
-typedef void CURLM;
+typedef struct Curl_multi CURLM;
 
 typedef enum {
   CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or