diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-18 10:58:58 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-18 11:05:45 +0200 |
commit | 8a6e89a9ebbaa79a2c4e4301774770efb3d24ef7 (patch) | |
tree | e1f5912ef215b364a0be7c0609f343070ecc6efb /lib/select.h | |
parent | a05906190ca6f7d6135f82595107bcabe4b75c77 (diff) | |
download | curl-8a6e89a9ebbaa79a2c4e4301774770efb3d24ef7.tar.gz |
select: switch to macros in uppercase
Curl_select_ready() was the former API that was replaced with
Curl_select_check() a while back and the former arg setup was provided
with a define (in order to leave existing code unmodified).
Now we instead offer SOCKET_READABLE and SOCKET_WRITABLE for the most
common shortcuts where only one socket is checked. They're also more
visibly macros.
Diffstat (limited to 'lib/select.h')
-rw-r--r-- | lib/select.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/select.h b/lib/select.h index 695bb69cc..1d26f4999 100644 --- a/lib/select.h +++ b/lib/select.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, 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 @@ -75,9 +75,10 @@ int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2, curl_socket_t writefd, long timeout_ms); -/* provide the former API internally */ -#define Curl_socket_ready(x,y,z) \ - Curl_socket_check(x, CURL_SOCKET_BAD, y, z) +#define SOCKET_READABLE(x,z) \ + Curl_socket_check(x, CURL_SOCKET_BAD, CURL_SOCKET_BAD, z) +#define SOCKET_WRITABLE(x,z) \ + Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z) int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); |