diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2019-01-30 17:26:39 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2019-01-30 17:26:39 +0000 |
commit | 38c0d71060c3d0c3c12d18db1d2f5f0b4a3f02a4 (patch) | |
tree | c9418f78094a2f52a33b2a7c5b8c64a815930c4d | |
parent | b0e060b6427beb4512169696c5236cafb09fc15c (diff) |
Rename 'cookie' parameter to 'watch'
-rw-r--r-- | include/tickit.h | 2 | ||||
-rw-r--r-- | src/tickit.c | 6 | ||||
-rw-r--r-- | t/51tickit-timer.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/tickit.h b/include/tickit.h index 58ebcfa..b8f8555 100644 --- a/include/tickit.h +++ b/include/tickit.h @@ -670,7 +670,7 @@ void *tickit_watch_timer_after_tv(Tickit *t, const struct timeval *after, Tickit void *tickit_watch_later(Tickit *t, TickitBindFlags flags, TickitCallbackFn *fn, void *user); -void tickit_watch_cancel(Tickit *t, void *cookie); +void tickit_watch_cancel(Tickit *t, void *watch); /* Debug support */ diff --git a/src/tickit.c b/src/tickit.c index e98efd6..ae95998 100644 --- a/src/tickit.c +++ b/src/tickit.c @@ -353,9 +353,9 @@ void *tickit_watch_later(Tickit *t, TickitBindFlags flags, TickitCallbackFn *fn, return watch; } -void tickit_watch_cancel(Tickit *t, void *cookie) +void tickit_watch_cancel(Tickit *t, void *_watch) { - Watch *watch = cookie; + Watch *watch = _watch; Watch **prevp; switch(watch->type) { @@ -375,7 +375,7 @@ void tickit_watch_cancel(Tickit *t, void *cookie) while(*prevp) { Watch *this = *prevp; - if(this == cookie) { + if(this == watch) { *prevp = this->next; if(this->flags & TICKIT_BIND_UNBIND) diff --git a/t/51tickit-timer.c b/t/51tickit-timer.c index 4fc1faa..aecb689 100644 --- a/t/51tickit-timer.c +++ b/t/51tickit-timer.c @@ -70,10 +70,10 @@ int main(int argc, char *argv[]) int called = 0; tickit_watch_timer_after_msec(t, 10, 0, &on_call_incr, &called); int not_called = 0; - void *cookie = tickit_watch_timer_after_msec(t, 5, TICKIT_BIND_UNBIND, &on_call_incr, ¬_called); + void *watch = tickit_watch_timer_after_msec(t, 5, TICKIT_BIND_UNBIND, &on_call_incr, ¬_called); unbound_count = 0; - tickit_watch_cancel(t, cookie); + tickit_watch_cancel(t, watch); is_int(unbound_count, 1, "unbound_count after tickit_watch_cancel"); tickit_run(t); |