1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 17:20:29 +02:00

* numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.

* tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
	tags.h to deprecated.h.
This commit is contained in:
Dirk Herrmann 2003-09-21 07:54:23 +00:00
parent 1cd9ea6915
commit f03314f920
5 changed files with 44 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
* tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
tags.h to deprecated.h.
2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
This set of patches introduces a new tc7 code scm_tc7_number for

View file

@ -27,6 +27,11 @@
#if (SCM_ENABLE_DEPRECATED == 1)
/* From tags.h: Macro checking for two tc16 types that are allocated to differ
* only in the 's'-bit. Deprecated in guile 1.7.0 on 2003-09-21. */
#define SCM_TYP16S(x) (0xfeff & SCM_CELL_TYPE (x))
/* From numbers.h: Macros checking for types, but avoiding a redundant check
* for !SCM_IMP. These were deprecated in guile 1.7.0 on 2003-09-06. */
#define SCM_SLOPPY_INEXACTP(x) (SCM_TYP16S (x) == scm_tc16_real)

View file

@ -126,12 +126,14 @@
* differ in one bit: This way, checking if an object is an inexact number can
* be done quickly (using the TYP16S macro). */
/* Number subtype 1 to 3 (note the dependency on the predicate SCM_NUMP) */
/* Number subtype 1 to 3 (note the dependency on the predicates SCM_INEXACTP
* and SCM_NUMP) */
#define scm_tc16_big (scm_tc7_number + 1 * 256L)
#define scm_tc16_real (scm_tc7_number + 2 * 256L)
#define scm_tc16_complex (scm_tc7_number + 3 * 256L)
#define SCM_INEXACTP(x) (!SCM_IMP (x) && SCM_TYP16S (x) == scm_tc16_real)
#define SCM_INEXACTP(x) \
(!SCM_IMP (x) && (0xfeff & SCM_CELL_TYPE (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)

View file

@ -468,10 +468,9 @@ typedef unsigned long scm_t_bits;
/* Definitions for tc16: */
#define SCM_TYP16(x) (0xffff & SCM_CELL_TYPE (x))
#define SCM_TYP16S(x) (0xfeff & SCM_CELL_TYPE (x))
#define SCM_TYP16_PREDICATE(tag, x) (!SCM_IMP (x) && SCM_TYP16 (x) == (tag))
/* Here is the first smob subtype. */
/* scm_tc_free_cell is the 0th smob type. We place this in free cells to tell