1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

* gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed

type errors that showed up when compiling with SCM_DEBUG defined.
This commit is contained in:
Dirk Herrmann 2003-04-20 08:39:38 +00:00
parent d0f6ceb84f
commit f96460ce84
2 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
type errors that showed up when compiling with SCM_DEBUG defined.
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* continuations.c, continuations.h, eval.c, eval.h, extensions.c, * continuations.c, continuations.h, eval.c, eval.h, extensions.c,

View file

@ -99,7 +99,7 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, scm_t_heap_segment*seg)
*/ */
for (p += offset; p < end; p += span, offset += span) for (p += offset; p < end; p += span, offset += span)
{ {
SCM scmptr = PTR2SCM(p); SCM scmptr = PTR2SCM (p);
if (SCM_C_BVEC_GET (bitvec, offset)) if (SCM_C_BVEC_GET (bitvec, offset))
continue; continue;
@ -109,12 +109,12 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, scm_t_heap_segment*seg)
/* The card can be swept more than once. Check that it's /* The card can be swept more than once. Check that it's
* the first time! * the first time!
*/ */
if (!SCM_STRUCT_GC_CHAIN (p)) if (!SCM_STRUCT_GC_CHAIN (scmptr))
{ {
/* Structs need to be freed in a special order. /* Structs need to be freed in a special order.
* This is handled by GC C hooks in struct.c. * This is handled by GC C hooks in struct.c.
*/ */
SCM_SET_STRUCT_GC_CHAIN (p, scm_i_structs_to_free); SCM_SET_STRUCT_GC_CHAIN (scmptr, scm_i_structs_to_free);
scm_i_structs_to_free = scmptr; scm_i_structs_to_free = scmptr;
} }
continue; continue;
@ -281,9 +281,9 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, scm_t_heap_segment*seg)
} }
SCM_SET_CELL_TYPE (p, scm_tc_free_cell); SCM_SET_CELL_TYPE (scmptr, scm_tc_free_cell);
SCM_SET_FREE_CELL_CDR (p, PTR2SCM (*free_list)); SCM_SET_FREE_CELL_CDR (scmptr, PTR2SCM (*free_list));
*free_list = PTR2SCM (p); *free_list = scmptr;
free_count ++; free_count ++;
} }
@ -315,9 +315,10 @@ scm_i_init_card_freelist (scm_t_cell * card, SCM *free_list,
*/ */
for (; p > card; p -= span) for (; p > card; p -= span)
{ {
SCM_SET_CELL_TYPE (p, scm_tc_free_cell); const SCM scmptr = PTR2SCM (p);
SCM_SET_FREE_CELL_CDR (p, PTR2SCM (*free_list)); SCM_SET_CELL_TYPE (scmptr, scm_tc_free_cell);
*free_list = PTR2SCM (p); SCM_SET_FREE_CELL_CDR (scmptr, PTR2SCM (*free_list));
*free_list = scmptr;
} }
return SCM_GC_CARD_N_CELLS - SCM_MAX(span, SCM_GC_CARD_N_HEADER_CELLS); return SCM_GC_CARD_N_CELLS - SCM_MAX(span, SCM_GC_CARD_N_HEADER_CELLS);