Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
authorIvan Maidanski <ivmai@mail.ru>
Wed, 17 Jan 2018 07:42:04 +0000 (10:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 17 Jan 2018 07:42:04 +0000 (10:42 +0300)
Issue #197 (bdwgc).

GC_set_free_space_divisor() and GC_set_warn_proc() used to return
some value.  But starting from version 7.1alpha2, these API functions
do not return any value.

* include/gc.h (GC_set_free_space_divisor, GC_set_warn_proc): Add
comment that the setter used to returned the old value in gc-7.1 (and
previous versions).

include/gc.h

index 471f57f..cfb0fd9 100644 (file)
@@ -328,6 +328,8 @@ GC_API GC_ATTR_DEPRECATED GC_word GC_free_space_divisor;
                         /* GC_call_with_alloc_lock() is required to     */
                         /* avoid data races (if the value is modified   */
                         /* after the GC is put to multi-threaded mode). */
+                        /* In version 7.1 (and before), the setter      */
+                        /* returned the old value.                      */
 GC_API void GC_CALL GC_set_free_space_divisor(GC_word);
 GC_API GC_word GC_CALL GC_get_free_space_divisor(void);
 
@@ -1302,7 +1304,8 @@ GC_API int GC_CALL GC_invoke_finalizers(void);
 /* GC_set_warn_proc can be used to redirect or filter warning messages. */
 /* p may not be a NULL pointer.  msg is printf format string (arg must  */
 /* match the format).  Both the setter and the getter acquire the GC    */
-/* lock (to avoid data races).                                          */
+/* lock (to avoid data races).  In version 7.1 (and before), the setter */
+/* returned the old warn_proc value.                                    */
 typedef void (GC_CALLBACK * GC_warn_proc)(char * /* msg */,
                                           GC_word /* arg */);
 GC_API void GC_CALL GC_set_warn_proc(GC_warn_proc /* p */) GC_ATTR_NONNULL(1);