From d799a7fc85723c829fd9ef625f1f586d79a37d47 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 11 Feb 2021 23:26:30 +0100 Subject: [PATCH] poll handle: rename variable to avoid clashing (close #236) --- src/uvw/poll.cpp | 4 ++-- src/uvw/poll.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uvw/poll.cpp b/src/uvw/poll.cpp index 816b3271..083d6742 100644 --- a/src/uvw/poll.cpp +++ b/src/uvw/poll.cpp @@ -16,7 +16,7 @@ UVW_INLINE PollEvent::PollEvent(Flags events) noexcept UVW_INLINE PollHandle::PollHandle(ConstructorAccess ca, std::shared_ptr ref, int desc) - : Handle{ca, std::move(ref)}, tag{FD}, fd{desc} + : Handle{ca, std::move(ref)}, tag{FD}, file_desc{desc} {} @@ -37,7 +37,7 @@ UVW_INLINE void PollHandle::startCallback(uv_poll_t *handle, int status, int eve UVW_INLINE bool PollHandle::init() { - return (tag == SOCKET) ? initialize(&uv_poll_init_socket, socket) : initialize(&uv_poll_init, fd); + return (tag == SOCKET) ? initialize(&uv_poll_init_socket, socket) : initialize(&uv_poll_init, file_desc); } diff --git a/src/uvw/poll.h b/src/uvw/poll.h index 6030fd59..c2451843 100644 --- a/src/uvw/poll.h +++ b/src/uvw/poll.h @@ -129,7 +129,7 @@ public: private: enum { FD, SOCKET } tag; union { - int fd; + int file_desc; OSSocketHandle::Type socket; }; };