Add public GC_set/get_abort_func to replace default GC_on_abort
authorIvan Maidanski <ivmai@mail.ru>
Sat, 23 Jun 2012 18:42:36 +0000 (22:42 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 24 Jun 2012 09:21:43 +0000 (13:21 +0400)
commitd020903787f3aa4f949bd5c48083cfd71d36df6f
treec86c849b602a74340e2259c98e69f87dcd089aa8
parent770355f3050d285953bf69002a0b2c7fe885698f
Add public GC_set/get_abort_func to replace default GC_on_abort

* include/gc.h (GC_abort_func): New public typedef.
* include/gc.h (GC_set_abort_func, GC_get_abort_func): New API
function declaration.
* include/private/gc_priv.h (GC_on_abort): Change function
declaration to function pointer of GC_abort_func type (only if
SMALL_CONFIG and not PCR).
* misc.c (GC_on_abort): Rename to GC_default_on_abort; make it STATIC
and decorate with GC_CALLBACK; define GC_on_abort variable initialized
to GC_default_on_abort (only if SMALL_CONFIG and not PCR).
* misc.c (GC_set_abort_func, GC_get_abort_func): New public function
(only if if SMALL_CONFIG and not PCR) to alter and read GC_on_abort
value.
include/gc.h
include/private/gc_priv.h
misc.c