1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

Removed use of SCM_POINTERS_MUNGED.

This commit is contained in:
Dirk Herrmann 2000-03-25 07:56:53 +00:00
parent 0cbaaf0b15
commit 96f6f4aebf
3 changed files with 13 additions and 25 deletions

View file

@ -1,3 +1,10 @@
2000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tags.h (SCM_POINTERS_MUNGED): Removed.
* gc.c (scm_gc_sweep, init_heap_seg): Removed use of
SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
2000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
* pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],

View file

@ -1587,12 +1587,6 @@ void
scm_gc_sweep ()
{
register SCM_CELLPTR ptr;
#ifdef SCM_POINTERS_MUNGED
register SCM scmptr;
#else
#undef scmptr
#define scmptr (SCM)ptr
#endif
register SCM nfreelist;
register scm_freelist_t *freelist;
register long m;
@ -1638,9 +1632,8 @@ scm_gc_sweep ()
seg_size = CELL_DN (scm_heap_table[i].bounds[1], span) - ptr;
for (j = seg_size + span; j -= span; ptr += span)
{
#ifdef SCM_POINTERS_MUNGED
scmptr = PTR2SCM (ptr);
#endif
SCM scmptr = PTR2SCM (ptr);
switch SCM_TYP7 (scmptr)
{
case scm_tcs_cons_gloc:
@ -2161,12 +2154,6 @@ static scm_sizet
init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
{
register SCM_CELLPTR ptr;
#ifdef SCM_POINTERS_MUNGED
register SCM scmptr;
#else
#undef scmptr
#define scmptr ptr
#endif
SCM_CELLPTR seg_end;
int new_seg_index;
int n_new_cells;
@ -2246,9 +2233,8 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
while (ptr < seg_end)
{
#ifdef SCM_POINTERS_MUNGED
scmptr = PTR2SCM (ptr);
#endif
SCM scmptr = PTR2SCM (ptr);
SCM_SETCAR (scmptr, scm_tc_free_cell);
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
ptr += span;
@ -2270,9 +2256,8 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
*/
while (ptr < seg_end)
{
#ifdef SCM_POINTERS_MUNGED
scmptr = PTR2SCM (ptr);
#endif
SCM scmptr = PTR2SCM (ptr);
SCM_SETCAR (scmptr, (SCM) scm_tc_free_cell);
SCM_SETCDR (scmptr, PTR2SCM (ptr + span));
ptr += span;
@ -2294,9 +2279,6 @@ init_heap_seg (SCM_CELLPTR seg_org, scm_sizet size, scm_freelist_t *freelist)
fprintf (stderr, "H");
#endif
return size;
#ifdef scmptr
#undef scmptr
#endif
}
#ifndef GUILE_NEW_GC_SCHEME

View file

@ -87,7 +87,6 @@ typedef void * SCM;
#ifdef _UNICOS
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x) >> 3))
# define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
# define SCM_POINTERS_MUNGED
#else
# define SCM2PTR(x) ((void *) (SCM_UNPACK (x)))
# define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))