summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2005-01-27 22:44:43 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2005-01-27 22:44:43 +0000
commit73a4c24e417fad800b99decea5b27b57cdb1e76d (patch)
treecc810b68a7cc3cb1bcb19abc7e0623b36d5a65d3 /libguile/gc.c
parent8b378a5f4893f3ee9e2738074370fd85bf3eef8e (diff)
downloadguile-73a4c24e417fad800b99decea5b27b57cdb1e76d.tar.gz
* gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
(tag_table_to_type_alist): ignore unknown types. * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return statistics on the number of live objects of each type. * gc-card.c (scm_i_tag_name): new function. (scm_i_card_statistics): new function.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index ef290d3c1..0f3c98c18 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -280,7 +280,11 @@ static SCM
tag_table_to_type_alist (void *closure, SCM key, SCM val, SCM acc)
{
scm_t_bits c_tag = scm_to_int (key);
- key = scm_from_locale_string (scm_i_tag_name (c_tag));
+
+ char const * name = scm_i_tag_name (c_tag);
+ if (name != NULL)
+ key = scm_from_locale_string (name);
+
return scm_cons (scm_cons (key, val), acc);
}