+2000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * gc.c (which_seg): Use SCM2PTR to convert a non immediate SCM
+ variable into a pointer to a heap cell.
+
+ * gc.c (scm_mark_locations, scm_cellp, init_heap_seg,
+ scm_unhash_name): Remove redundant cast to SCM_CELLPTR.
+
2000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
* print.c (scm_iprin1): Don't assign zero to SCM values, use
int i;
for (i = 0; i < scm_n_heap_segs; i++)
- if (SCM_PTR_LE (scm_heap_table[i].bounds[0], (SCM_CELLPTR) cell)
- && SCM_PTR_GT (scm_heap_table[i].bounds[1], (SCM_CELLPTR) cell))
+ if (SCM_PTR_LE (scm_heap_table[i].bounds[0], SCM2PTR (cell))
+ && SCM_PTR_GT (scm_heap_table[i].bounds[1], SCM2PTR (cell)))
return i;
fprintf (stderr, "which_seg: can't find segment containing cell %lx\n",
SCM_UNPACK (cell));
while (0 <= --m)
if (SCM_CELLP (* (SCM *) &x[m]))
{
- ptr = (SCM_CELLPTR) SCM2PTR (* (SCM *) &x[m]);
+ ptr = SCM2PTR (* (SCM *) &x[m]);
i = 0;
j = scm_n_heap_segs - 1;
if ( SCM_PTR_LE (scm_heap_table[i].bounds[0], ptr)
if (SCM_CELLP (value))
{
- ptr = (SCM_CELLPTR) SCM2PTR (value);
+ ptr = SCM2PTR (value);
i = 0;
j = scm_n_heap_segs - 1;
if ( SCM_PTR_LE (scm_heap_table[i].bounds[0], ptr)
scm_heap_table[new_seg_index].valid = 0;
scm_heap_table[new_seg_index].span = span;
scm_heap_table[new_seg_index].freelist = freelist;
- scm_heap_table[new_seg_index].bounds[0] = (SCM_CELLPTR)ptr;
- scm_heap_table[new_seg_index].bounds[1] = (SCM_CELLPTR)seg_end;
+ scm_heap_table[new_seg_index].bounds[0] = ptr;
+ scm_heap_table[new_seg_index].bounds[1] = seg_end;
/* Compute the least valid object pointer w/in this segment
{
SCM_CELLPTR p;
SCM_CELLPTR pbound;
- p = (SCM_CELLPTR)scm_heap_table[x].bounds[0];
- pbound = (SCM_CELLPTR)scm_heap_table[x].bounds[1];
+ p = scm_heap_table[x].bounds[0];
+ pbound = scm_heap_table[x].bounds[1];
while (p < pbound)
{
SCM cell = PTR2SCM (p);