summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-04-26 20:14:51 +0200
committerMarcel Raad <raad@teamviewer.com>2017-05-03 18:30:21 +0200
commitfa12f54bba39bf5795826e04c9f0fa1a4e052157 (patch)
tree76952a4721dcfd6c57a8fc87bced94712ef505d7
parent3ff0d2fb00c33c70deb937df6e4be28eb5e81498 (diff)
downloadgnurl-fa12f54bba39bf5795826e04c9f0fa1a4e052157.tar.gz
gnurl-fa12f54bba39bf5795826e04c9f0fa1a4e052157.tar.bz2
gnurl-fa12f54bba39bf5795826e04c9f0fa1a4e052157.zip
typecheck-gcc: add support for CURLINFO_SOCKET
Closes https://github.com/curl/curl/pull/1452
-rw-r--r--include/curl/typecheck-gcc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
index 564b17907..fd2c844dc 100644
--- a/include/curl/typecheck-gcc.h
+++ b/include/curl/typecheck-gcc.h
@@ -124,6 +124,9 @@ __extension__ ({ \
if(_curl_is_slist_info(_curl_info)) \
if(!_curl_is_arr((arg), struct curl_slist *)) \
_curl_easy_getinfo_err_curl_slist(); \
+ if(_curl_is_socket_info(_curl_info)) \
+ if(!_curl_is_arr((arg), curl_socket_t)) \
+ _curl_easy_getinfo_err_curl_socket(); \
} \
curl_easy_getinfo(handle, _curl_info, arg); \
})
@@ -201,6 +204,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_double,
"curl_easy_getinfo expects a pointer to double for this info")
_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
"curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info")
+_CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
+ "curl_easy_getinfo expects a pointer to curl_socket_t for this info")
/* groups of curl_easy_setops options that take the same type of argument */
@@ -365,6 +370,10 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
#define _curl_is_slist_info(info) \
(CURLINFO_SLIST < (info) && (info) < CURLINFO_SOCKET)
+/* true if info expects a pointer to struct curl_socket_t argument */
+#define _curl_is_socket_info(info) \
+ (CURLINFO_SOCKET < (info))
+
/* typecheck helpers -- check whether given expression has requested type*/