summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-02-01 18:25:44 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-02-03 17:38:19 +0100
commit1a1d3508479036e7446bbf4818dba876eedc3348 (patch)
tree569b2f336f3fd5ba7d6502fe78a375d35f6a3876 /misc.c
parent320d5bc7df468202b3dc823d21142c2374e04e2d (diff)
Add GC_is_disabled new function to GC API
* include/gc.h (GC_dont_gc): Improve comment (add note for new client code). * include/gc.h (GC_is_disabled): New API function. * misc.c (GC_is_disabled): Likewise.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 8b24aa0..2fd4166 100644
--- a/misc.c
+++ b/misc.c
@@ -1444,6 +1444,11 @@ GC_API void GC_CALL GC_disable(void)
UNLOCK();
}
+GC_API int GC_CALL GC_is_disabled(void)
+{
+ return GC_dont_gc != 0;
+}
+
/* Helper procedures for new kind creation. */
GC_API void ** GC_CALL GC_new_free_list_inner(void)
{