mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
* numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
(SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the respective SLOPPY macro.
This commit is contained in:
parent
baa84a205c
commit
5d7d39ff5d
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
|
||||
|
||||
(SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
|
||||
respective SLOPPY macro.
|
||||
|
||||
2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
|
||||
#define SCM_INUMP(x) (2 & SCM_UNPACK (x))
|
||||
#define SCM_NINUMP(x) (!SCM_INUMP (x))
|
||||
#define SCM_MAKINUM(x) (SCM_PACK ((((scm_t_signed_bits) (x)) << 2) + 2))
|
||||
#define SCM_MAKINUM(x) \
|
||||
(SCM_PACK ((((scm_t_signed_bits) (x)) << 2) + scm_tc2_int))
|
||||
#define SCM_INUM(x) (SCM_SRS ((scm_t_signed_bits) SCM_UNPACK (x), 2))
|
||||
|
||||
|
||||
|
@ -123,9 +124,9 @@
|
|||
#define SCM_SLOPPY_INEXACTP(x) (SCM_TYP16S (x) == scm_tc16_real)
|
||||
#define SCM_SLOPPY_REALP(x) (SCM_TYP16 (x) == scm_tc16_real)
|
||||
#define SCM_SLOPPY_COMPLEXP(x) (SCM_TYP16 (x) == scm_tc16_complex)
|
||||
#define SCM_INEXACTP(x) (!SCM_IMP (x) && SCM_TYP16S (x) == scm_tc16_real)
|
||||
#define SCM_REALP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_real)
|
||||
#define SCM_COMPLEXP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_complex)
|
||||
#define SCM_INEXACTP(x) (!SCM_IMP (x) && SCM_SLOPPY_INEXACTP(x))
|
||||
#define SCM_REALP(x) (!SCM_IMP (x) && SCM_SLOPPY_REALP(x))
|
||||
#define SCM_COMPLEXP(x) (!SCM_IMP (x) && SCM_SLOPPY_COMPLEXP(x))
|
||||
|
||||
#define SCM_REAL_VALUE(x) (((scm_t_double *) SCM2PTR (x))->real)
|
||||
#define SCM_COMPLEX_MEM(x) ((scm_t_complex *) SCM_CELL_WORD_1 (x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue