const-ify handle argument to uv_is_active()
This commit is contained in:
parent
6c2a2aa250
commit
fb6c9eef2a
@ -400,7 +400,7 @@ UV_EXTERN size_t uv_req_size(uv_req_type type);
|
||||
* Returns 1 if the prepare/check/idle/timer handle has been started, 0
|
||||
* otherwise. For other handle types this always returns 1.
|
||||
*/
|
||||
UV_EXTERN int uv_is_active(uv_handle_t* handle);
|
||||
UV_EXTERN int uv_is_active(const uv_handle_t* handle);
|
||||
|
||||
/*
|
||||
* Request handle to be closed. close_cb will be called asynchronously after
|
||||
|
||||
@ -289,16 +289,16 @@ void uv__req_init(uv_loop_t* loop, uv_req_t* req) {
|
||||
}
|
||||
|
||||
|
||||
int uv_is_active(uv_handle_t* handle) {
|
||||
int uv_is_active(const uv_handle_t* handle) {
|
||||
switch (handle->type) {
|
||||
case UV_CHECK:
|
||||
return uv__check_active((uv_check_t*)handle);
|
||||
return uv__check_active((const uv_check_t*)handle);
|
||||
case UV_IDLE:
|
||||
return uv__idle_active((uv_idle_t*)handle);
|
||||
return uv__idle_active((const uv_idle_t*)handle);
|
||||
case UV_PREPARE:
|
||||
return uv__prepare_active((uv_prepare_t*)handle);
|
||||
return uv__prepare_active((const uv_prepare_t*)handle);
|
||||
case UV_TIMER:
|
||||
return uv__timer_active((uv_timer_t*)handle);
|
||||
return uv__timer_active((const uv_timer_t*)handle);
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ uv_handle_type uv_guess_handle(uv_file file) {
|
||||
}
|
||||
|
||||
|
||||
int uv_is_active(uv_handle_t* handle) {
|
||||
int uv_is_active(const uv_handle_t* handle) {
|
||||
switch (handle->type) {
|
||||
case UV_TIMER:
|
||||
case UV_IDLE:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user