]> granicus.if.org Git - gc/commit
Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
authorIvan Maidanski <ivmai@mail.ru>
Tue, 6 Mar 2012 16:26:24 +0000 (20:26 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 6 Mar 2012 16:40:35 +0000 (20:40 +0400)
commitd952e32f2864c157cfa2583355a17c5cf7796663
tree9ca6c05f4a76a086e285700f58eb53433ff02f01
parent1a4dd0e75fd177ddf7eadf8654057ed243fc0c2d
Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
(Apply commit 9dc445d from 'master' branch)

* include/private/gc_priv.h (GC_print_stats): Update the comment.
* tests/test.c (GC_print_stats, run_one_test, check_heap_stats):
Rename GC_print_stats to print_stats (since the former is used
internally by GC and not exported).
* tests/test.c (print_stats): Always define (either as a macro or
a static int variable) regardless of GC_DLL and SMALL_CONFIG.
* tests/test.c (INIT_PRINT_STATS): New macro (used to initialize
print_stats if needed); GETENV is used if needed and available.
* tests/test.c (GC_COND_INIT): Invoke INIT_PRINT_STATS.
include/private/gc_priv.h
tests/test.c