From 06daa3362fbee5f84e25e98bd80da5d7692290a0 Mon Sep 17 00:00:00 2001 From: Dan Egnor <egnor@ofb.net> Date: Mon, 24 Sep 2001 14:48:39 +0000 Subject: [PATCH] Better comments; zero data pointer when cancelling events to help conservative GC do its job better --- oop.h | 6 ++++-- sys.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/oop.h b/oop.h index b25a08c..c940963 100644 --- a/oop.h +++ b/oop.h @@ -69,8 +69,10 @@ typedef struct oop_source_sys oop_source_sys; oop_source_sys *oop_sys_new(void); /* Process events until either of the following two conditions: - 1 -- some callback returns non-NULL; will return the value in question. - 2 -- no callbacks are registered; will return NULL. */ + 1 -- some callback returns anything but OOP_CONTINUE; + will return the value in question. + 2 -- no callbacks are registered; will return OOP_CONTINUE. + 3 -- an error occurs; will return OOP_ERROR (check errno). */ void *oop_sys_run(oop_source_sys *); /* Delete a system event source. No callbacks may be registered. */ diff --git a/sys.c b/sys.c index 8657569..f33a631 100644 --- a/sys.c +++ b/sys.c @@ -101,6 +101,7 @@ static void sys_cancel_fd(oop_source *source,int fd,oop_event ev) { oop_source_sys *sys = verify_source(source); if (fd < sys->num_files && NULL != sys->files[fd][ev].f) { sys->files[fd][ev].f = NULL; + sys->files[fd][ev].v = NULL; --sys->num_events; } } -- GitLab