mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-12 16:50:22 +02:00
A couple of typing problems (at leat partially) resolved.
This commit is contained in:
parent
f1083dd7d7
commit
f2961ccd8f
4 changed files with 26 additions and 5 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* numbers.h (SCM_MAKINUM): The parameter to SCM_MAKINUM should
|
||||||
|
already be a C value. No need to unpack it.
|
||||||
|
|
||||||
|
* numbers.h (scm_long_long2num): Cast the parameter to scm_bits_t
|
||||||
|
if we know it fits into an inum.
|
||||||
|
|
||||||
|
* ramap.c (ramap_rp): An scm_tc7_[ui]vect object does point to a
|
||||||
|
field of long values. In contrast, SCM_VELTS accesses a field of
|
||||||
|
SCM values.
|
||||||
|
|
||||||
2000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
2000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||||
|
|
||||||
* gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
|
* gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
|
||||||
|
|
|
@ -4422,7 +4422,11 @@ scm_long_long2num (long_long sl)
|
||||||
return scm_makdbl ((double) sl, 0.0);
|
return scm_makdbl ((double) sl, 0.0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return SCM_MAKINUM (sl);
|
else
|
||||||
|
{
|
||||||
|
/* we know that sl fits into an inum */
|
||||||
|
return SCM_MAKINUM ((scm_bits_t) sl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -71,9 +71,9 @@
|
||||||
/* shifts of more than one are done by a library call, single shifts are
|
/* shifts of more than one are done by a library call, single shifts are
|
||||||
* performed in registers
|
* performed in registers
|
||||||
*/
|
*/
|
||||||
# define SCM_MAKINUM(x) (SCM_PACK (((SCM_UNPACK (x) << 1) << 1) + 2L))
|
# define SCM_MAKINUM(x) (SCM_PACK ((((x) << 1) << 1) + 2L))
|
||||||
#else
|
#else
|
||||||
# define SCM_MAKINUM(x) (SCM_PACK ((SCM_UNPACK (x) << 2) + 2L))
|
# define SCM_MAKINUM(x) (SCM_PACK (((x) << 2) + 2L))
|
||||||
#endif /* def __TURBOC__ */
|
#endif /* def __TURBOC__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1321,8 +1321,13 @@ ramap_rp (SCM ra0,SCM proc,SCM ras)
|
||||||
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
|
||||||
if (SCM_BITVEC_REF (ra0, i0))
|
if (SCM_BITVEC_REF (ra0, i0))
|
||||||
{
|
{
|
||||||
if (SCM_FALSEP (SCM_SUBRF (proc) (SCM_MAKINUM (SCM_VELTS (ra1)[i1]),
|
/* DIRK:FIXME:: There should be a way to access the elements
|
||||||
SCM_MAKINUM (SCM_VELTS (ra2)[i2]))))
|
of a cell as raw data. Further: How can we be sure that
|
||||||
|
the values fit into an inum?
|
||||||
|
*/
|
||||||
|
SCM n1 = SCM_MAKINUM (((long *) SCM2PTR (SCM_CDR (ra1)))[i1]);
|
||||||
|
SCM n2 = SCM_MAKINUM (((long *) SCM2PTR (SCM_CDR (ra2)))[i2]);
|
||||||
|
if (SCM_FALSEP (SCM_SUBRF (proc) (n1, n2)));
|
||||||
SCM_BITVEC_CLR (ra0, i0);
|
SCM_BITVEC_CLR (ra0, i0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue