poll: fix compile errors caused by ambiguous naming of poll_event in poll_handle (#281)
This commit is contained in:
parent
950aa6486e
commit
e059473135
@ -20,7 +20,7 @@ UVW_INLINE void poll_handle::start_callback(uv_poll_t *hndl, int status, int eve
|
||||
if(poll_handle &poll = *(static_cast<poll_handle *>(hndl->data)); status) {
|
||||
poll.publish(error_event{status});
|
||||
} else {
|
||||
poll.publish(poll_event{poll_event(events)});
|
||||
poll.publish(poll_event{poll_event_flags(events)});
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ UVW_INLINE int poll_handle::init() {
|
||||
}
|
||||
}
|
||||
|
||||
UVW_INLINE int poll_handle::start(poll_handle::poll_event flags) {
|
||||
UVW_INLINE int poll_handle::start(poll_event_flags flags) {
|
||||
return uv_poll_start(raw(), static_cast<uv_poll_event>(flags), &start_callback);
|
||||
}
|
||||
|
||||
|
||||
@ -56,11 +56,11 @@ struct poll_event {
|
||||
* [documentation](http://docs.libuv.org/en/v1.x/poll.html)
|
||||
* for further details.
|
||||
*/
|
||||
class poll_handle final: public handle<poll_handle, uv_poll_t, details::uvw_poll_event> {
|
||||
class poll_handle final: public handle<poll_handle, uv_poll_t, poll_event> {
|
||||
static void start_callback(uv_poll_t *hndl, int status, int events);
|
||||
|
||||
public:
|
||||
using poll_event = details::uvw_poll_event;
|
||||
using poll_event_flags = details::uvw_poll_event;
|
||||
|
||||
explicit poll_handle(loop::token token, std::shared_ptr<loop> ref, int desc);
|
||||
explicit poll_handle(loop::token token, std::shared_ptr<loop> ref, os_socket_handle sock);
|
||||
@ -90,7 +90,7 @@ public:
|
||||
* @param flags The events to which the caller is interested.
|
||||
* @return Underlying return value.
|
||||
*/
|
||||
int start(poll_event flags);
|
||||
int start(poll_event_flags flags);
|
||||
|
||||
/**
|
||||
* @brief Stops polling the file descriptor.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user