mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +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:
parent
1cd9ea6915
commit
f03314f920
5 changed files with 44 additions and 4 deletions
27
NEWS
27
NEWS
|
@ -637,6 +637,33 @@ Guile always defines
|
|||
|
||||
scm_t_timespec
|
||||
|
||||
** The macro SCM_IFLAGP now only returns true for flags
|
||||
|
||||
User code should never have used this macro anyway. And, you should not use
|
||||
it in the future either. Thus, the following explanation is just for the
|
||||
impropable case that your code actually made use of this macro, and that you
|
||||
are willing to depend on internals which will probably change in the near
|
||||
future.
|
||||
|
||||
Formerly, SCM_IFLAGP also returned true for evaluator bytecodes created with
|
||||
SCM_MAKSPCSYM (short instructions) and evaluator bytecodes created with
|
||||
SCM_MAKISYM (short instructions). Now, SCM_IFLAG only returns true for
|
||||
Guile's special constants created with SCM_MAKIFLAG. To achieve the old
|
||||
behaviour, instead of
|
||||
|
||||
SCM_IFLAGP(x)
|
||||
|
||||
you would have to write
|
||||
|
||||
(SCM_ISYMP(x) || SCM_IFLAGP(x))
|
||||
|
||||
** The macro SCM_TYP16S has been deprecated.
|
||||
|
||||
This macro is not intended for public use. However, if you allocated types
|
||||
with tc16 type codes in a way that you would have needed this macro, you are
|
||||
expected to have a deep knowledge of Guile's type system. Thus, you should
|
||||
know how to replace this macro.
|
||||
|
||||
** The macro SCM_SLOPPY_INEXACTP has been deprecated.
|
||||
|
||||
Use SCM_INEXACTP instead.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue