osx: pass const handle pointer to uv___stream_fd

uv___stream_fd does not modify passed parameter, so non-const
pointer is not required here.
This commit is contained in:
Chernyshev Viacheslav 2014-04-17 15:48:00 +04:00 committed by Saúl Ibarra Corretgé
parent 8514c1c1a3
commit 4018f72615
2 changed files with 4 additions and 4 deletions

View File

@ -241,8 +241,8 @@ void uv__udp_finish_close(uv_udp_t* handle);
uv_handle_type uv__handle_type(int fd);
#if defined(__APPLE__)
int uv___stream_fd(uv_stream_t* handle);
#define uv__stream_fd(handle) (uv___stream_fd((uv_stream_t*) (handle)))
int uv___stream_fd(const uv_stream_t* handle);
#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle)))
#else
#define uv__stream_fd(handle) ((handle)->io_watcher.fd)
#endif /* defined(__APPLE__) */

View File

@ -1482,8 +1482,8 @@ int uv_is_writable(const uv_stream_t* stream) {
#if defined(__APPLE__)
int uv___stream_fd(uv_stream_t* handle) {
uv__stream_select_t* s;
int uv___stream_fd(const uv_stream_t* handle) {
const uv__stream_select_t* s;
assert(handle->type == UV_TCP ||
handle->type == UV_TTY ||