From a8db4a59c898598cc55dd3bd86a6fd8618721d10 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 9 Sep 2008 22:46:04 +0200 Subject: Use Gnulib's `count-one-bits' as a replacement for `scm_i_uint_bit_count ()'. * libguile/gc-card.c: Include and . (scm_i_uint_bit_count): Remove. (scm_i_card_marked_count): Use `count_one_bits_l ()' instead of `scm_i_uint_bit_count ()'. * libguile/gc-segment.c: Include and . (scm_i_heap_segment_marked_count): Use `count_one_bits_l ()' instead of `scm_i_uint_bit_count ()'. * libguile/private-gc.h (scm_i_uint_bit_count): Remove. --- libguile/gc-segment.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libguile/gc-segment.c') diff --git a/libguile/gc-segment.c b/libguile/gc-segment.c index 4f7b6d59a..f53ec9675 100644 --- a/libguile/gc-segment.c +++ b/libguile/gc-segment.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,10 +15,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +# include +#endif + #include #include #include +#include + #include "libguile/_scm.h" #include "libguile/pairs.h" #include "libguile/gc.h" @@ -109,7 +115,7 @@ scm_i_heap_segment_marked_count (scm_t_heap_segment *seg) int count = 0; while (bvec < bvec_end) { - count += scm_i_uint_bit_count (*bvec); + count += count_one_bits_l (*bvec); bvec ++; } return count * seg->span; -- cgit v1.2.3