diff --git a/libguile/ChangeLog b/libguile/ChangeLog index c0df118ad..082272c4d 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2003-09-04 Dirk Herrmann + + * 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 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of diff --git a/libguile/numbers.h b/libguile/numbers.h index 8540d3585..c46bfe816 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -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))