Adhere to the naming conventions in uv_timer_* functions.

In the src/*/timer.c code the first argument is called handle, not timer.
We should be consistent in the interface definition file.
This commit is contained in:
Andrius Bentkus 2013-02-15 05:26:08 +01:00 committed by Ben Noordhuis
parent b6f72e54c4
commit 7480974efe

View File

@ -1161,7 +1161,7 @@ struct uv_timer_s {
UV_TIMER_PRIVATE_FIELDS UV_TIMER_PRIVATE_FIELDS
}; };
UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* timer); UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle);
/* /*
* Start the timer. `timeout` and `repeat` are in milliseconds. * Start the timer. `timeout` and `repeat` are in milliseconds.
@ -1175,19 +1175,19 @@ UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* timer);
* version of libuv. Don't pass in negative values, you'll get a nasty surprise * version of libuv. Don't pass in negative values, you'll get a nasty surprise
* when that change becomes effective. * when that change becomes effective.
*/ */
UV_EXTERN int uv_timer_start(uv_timer_t* timer, UV_EXTERN int uv_timer_start(uv_timer_t* handle,
uv_timer_cb cb, uv_timer_cb cb,
int64_t timeout, int64_t timeout,
int64_t repeat); int64_t repeat);
UV_EXTERN int uv_timer_stop(uv_timer_t* timer); UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
/* /*
* Stop the timer, and if it is repeating restart it using the repeat value * Stop the timer, and if it is repeating restart it using the repeat value
* as the timeout. If the timer has never been started before it returns -1 and * as the timeout. If the timer has never been started before it returns -1 and
* sets the error to UV_EINVAL. * sets the error to UV_EINVAL.
*/ */
UV_EXTERN int uv_timer_again(uv_timer_t* timer); UV_EXTERN int uv_timer_again(uv_timer_t* handle);
/* /*
* Set the repeat value in milliseconds. Note that if the repeat value is set * Set the repeat value in milliseconds. Note that if the repeat value is set
@ -1195,9 +1195,9 @@ UV_EXTERN int uv_timer_again(uv_timer_t* timer);
* non-repeating before, it will have been stopped. If it was repeating, then * non-repeating before, it will have been stopped. If it was repeating, then
* the old repeat value will have been used to schedule the next timeout. * the old repeat value will have been used to schedule the next timeout.
*/ */
UV_EXTERN void uv_timer_set_repeat(uv_timer_t* timer, int64_t repeat); UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, int64_t repeat);
UV_EXTERN int64_t uv_timer_get_repeat(uv_timer_t* timer); UV_EXTERN int64_t uv_timer_get_repeat(uv_timer_t* handle);
/* /*