diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-14 00:05:04 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-15 08:54:42 +0200 |
commit | 8df455479f8801bbebad8839fc96abbffa711603 (patch) | |
tree | ad0fcac278779ef75726f8aec6a061453c043282 /include | |
parent | 5d54b5e6971cf26b35d11980d6953bf436419752 (diff) |
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples
- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.
Closes #5338
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index a3da3da86..7b92975c7 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2115,8 +2115,8 @@ CURL_EXTERN int curl_strequal(const char *s1, const char *s2); CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n); /* Mime/form handling support. */ -typedef struct curl_mime_s curl_mime; /* Mime context. */ -typedef struct curl_mimepart_s curl_mimepart; /* Mime part context. */ +typedef struct curl_mime curl_mime; /* Mime context. */ +typedef struct curl_mimepart curl_mimepart; /* Mime part context. */ /* * NAME curl_mime_init() @@ -2490,10 +2490,11 @@ struct curl_slist { * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE. */ -typedef struct { +struct curl_ssl_backend { curl_sslbackend id; const char *name; -} curl_ssl_backend; +}; +typedef struct curl_ssl_backend curl_ssl_backend; typedef enum { CURLSSLSET_OK = 0, @@ -2745,7 +2746,7 @@ typedef enum { from above. */ #define CURLVERSION_NOW CURLVERSION_SEVENTH -typedef struct { +struct curl_version_info_data { CURLversion age; /* age of the returned struct */ const char *version; /* LIBCURL_VERSION */ unsigned int version_num; /* LIBCURL_VERSION_NUM */ @@ -2789,7 +2790,8 @@ typedef struct { const char *capath; /* the built-in default CURLOPT_CAPATH, might be NULL */ -} curl_version_info_data; +}; +typedef struct curl_version_info_data curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ #define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported |