mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 13:40:42 -06:00
cmUVHandlePtr: Add uv_idle_ptr::{start,stop} methods
These were missing w.r.t. the pattern established for other handle wrappers.
This commit is contained in:
@@ -266,6 +266,18 @@ int uv_idle_ptr::init(uv_loop_t& loop, void* data)
|
||||
return uv_idle_init(&loop, *this);
|
||||
}
|
||||
|
||||
int uv_idle_ptr::start(uv_idle_cb cb)
|
||||
{
|
||||
assert(this->handle);
|
||||
return uv_idle_start(*this, cb);
|
||||
}
|
||||
|
||||
void uv_idle_ptr::stop()
|
||||
{
|
||||
assert(this->handle);
|
||||
uv_idle_stop(*this);
|
||||
}
|
||||
|
||||
template class uv_handle_ptr_base_<uv_handle_t>;
|
||||
|
||||
#define UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(NAME) \
|
||||
|
||||
@@ -201,6 +201,10 @@ struct uv_idle_ptr : public uv_handle_ptr_<uv_idle_t>
|
||||
CM_INHERIT_CTOR(uv_idle_ptr, uv_handle_ptr_, <uv_idle_t>);
|
||||
|
||||
int init(uv_loop_t& loop, void* data = nullptr);
|
||||
|
||||
int start(uv_idle_cb cb);
|
||||
|
||||
void stop();
|
||||
};
|
||||
|
||||
struct uv_signal_ptr : public uv_handle_ptr_<uv_signal_t>
|
||||
|
||||
Reference in New Issue
Block a user