Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
const-ify handle argument to uv_is_active()
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Apr 18, 2012
1 parent 6c2a2aa commit fb6c9ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/uv.h
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/unix/core.c
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/win/handle.c
Expand Up @@ -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:
Expand Down

0 comments on commit fb6c9ee

Please sign in to comment.