summaryrefslogtreecommitdiff
path: root/libguile/gc-card.c
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2005-05-11 07:41:36 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2005-05-11 07:41:36 +0000
commitb01532af77392c508b6850304bfefde4f7d23b7e (patch)
treef80f68e53a024add6664213860e8603a3273471b /libguile/gc-card.c
parent229a07109cd417426931ab4b3c91930577db4809 (diff)
downloadguile-b01532af77392c508b6850304bfefde4f7d23b7e.tar.gz
* threads.c (s_scm_lock_mutex): Don't declare msg in middle of
code. * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle of code. * gc-card.c (scm_i_card_statistics): Don't declare tag in middle of code. (scm_i_card_statistics): Add block for declarations of tag_as_scm and current.
Diffstat (limited to 'libguile/gc-card.c')
-rw-r--r--libguile/gc-card.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libguile/gc-card.c b/libguile/gc-card.c
index 3fe6e3c40..8e772043b 100644
--- a/libguile/gc-card.c
+++ b/libguile/gc-card.c
@@ -308,11 +308,13 @@ scm_i_card_statistics (scm_t_cell *p, SCM hashtab, scm_t_heap_segment *seg)
for (p += offset; p < end; p += span, offset += span)
{
+ scm_t_bits tag;
SCM scmptr = PTR2SCM (p);
+
if (!SCM_C_BVEC_GET (bitvec, offset))
continue;
- scm_t_bits tag = SCM_TYP7 (scmptr);
+ tag = SCM_TYP7 (scmptr);
if (tag == scm_tc7_smob)
{
tag = SCM_TYP16(scmptr);
@@ -337,12 +339,14 @@ scm_i_card_statistics (scm_t_cell *p, SCM hashtab, scm_t_heap_segment *seg)
tag = scm_tc7_asubr;
break;
}
-
- SCM tag_as_scm = scm_from_int (tag);
- SCM current = scm_hashq_ref (hashtab, tag_as_scm, SCM_I_MAKINUM (0));
- scm_hashq_set_x (hashtab, tag_as_scm,
- scm_from_int (scm_to_int (current) + 1));
+ {
+ SCM tag_as_scm = scm_from_int (tag);
+ SCM current = scm_hashq_ref (hashtab, tag_as_scm, SCM_I_MAKINUM (0));
+
+ scm_hashq_set_x (hashtab, tag_as_scm,
+ scm_from_int (scm_to_int (current) + 1));
+ }
}
}