[Gc] Addition of exported GC_set_all_interior_pointers

Ivan Maidanski ivmai at mail.ru
Tue Nov 25 11:45:45 PST 2008


Hi!

This patch simply adds a setter func for GC_finalize_on_demand global var.

Bye.

PS. See also my next post.
-------------- next part --------------
diff -ru bdwgc/include/gc.h updated/bdwgc/include/gc.h
--- bdwgc/include/gc.h	2008-11-22 16:34:42.000000000 +0300
+++ updated/bdwgc/include/gc.h	2008-11-25 19:24:18.000000000 +0300
@@ -118,6 +118,7 @@
 			/* at least a byte to allow "off the end"	*/
 			/* pointer recognition.				*/
 			/* MUST BE 0 or 1.				*/
+GC_API int GC_CALL GC_set_all_interior_pointers(int);
 
 GC_API int GC_finalize_on_demand;
 			/* If nonzero, finalizers will only be run in 	*/
diff -ru bdwgc/misc.c updated/bdwgc/misc.c
--- bdwgc/misc.c	2008-11-23 19:21:18.000000000 +0300
+++ updated/bdwgc/misc.c	2008-11-25 19:23:20.000000000 +0300
@@ -1273,6 +1273,16 @@
     return ofn;
 }
 
+GC_API int GC_CALL GC_set_all_interior_pointers(int value)
+{
+    int ovalue = GC_all_interior_pointers;
+    if (value != -1) {
+	GC_ASSERT(value == 0 || value == 1);
+	GC_all_interior_pointers = value;
+    }
+    return ovalue;
+}
+
 GC_API int GC_CALL GC_set_finalize_on_demand(int value)
 {
     int ovalue = GC_finalize_on_demand;


More information about the Gc mailing list