From 24792b4d9efbf8f1ff855192bf9c8329822494ae Mon Sep 17 00:00:00 2001 From: Jean-Claude Beaudoin Date: Sun, 24 Jun 2012 02:32:51 -0400 Subject: [PATCH] Added documentation to abort and exit callback hook declarations. --- include/gc.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/gc.h b/include/gc.h index 9cbc560a..c7d0d0ce 100644 --- a/include/gc.h +++ b/include/gc.h @@ -1612,14 +1612,26 @@ GC_API void GC_CALL GC_win32_free_heap(void); typedef void (GC_CALLBACK * GC_exit_func)(int /* status */); - GC_API void GC_CALL GC_set_exit_func(GC_exit_func); GC_API GC_exit_func GC_CALL GC_get_exit_func(void); + /* The function registered by this setter is */ + /* invoked when the GC is just about to call */ + /* exit(). */ + /* If this callback function returns then, and */ + /* only then, exit() is called. */ + /* These setter and getter are synchronized. */ typedef void (GC_CALLBACK * GC_abort_func)(const char * /* msg */); - GC_API void GC_CALL GC_set_abort_func(GC_abort_func); GC_API GC_abort_func GC_CALL GC_get_abort_func(void); + /* The function registered by this setter is */ + /* invoked when the GC is just about to call */ + /* abort(). */ + /* If this callback function returns then, and */ + /* only then, abort() may be called. */ + /* This callback function is passed a string */ + /* that describes the cause of the abort. */ + /* These setter and getter are synchronized. */ #ifdef __cplusplus } /* end of extern "C" */ -- 2.40.0