mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
Reimplement using scm_is_false, scm_is_true, scm_is_bool, and scm_from_bool, respectively. (SCM_NINUMP): Added. * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into deprecated.h. Replaced all uses with scm_is_eq.
This commit is contained in:
parent
e759bc7c33
commit
2ad58b2a89
1 changed files with 13 additions and 6 deletions
|
@ -77,7 +77,7 @@ SCM_API const char scm_s_formals[];
|
||||||
/* From eval.h: Helper macros for evaluation and application. These were
|
/* From eval.h: Helper macros for evaluation and application. These were
|
||||||
* deprecated in guile 1.7.0 on 2003-06-02. */
|
* deprecated in guile 1.7.0 on 2003-06-02. */
|
||||||
#define SCM_EVALIM2(x) \
|
#define SCM_EVALIM2(x) \
|
||||||
((SCM_EQ_P ((x), SCM_EOL) \
|
((scm_is_eq ((x), SCM_EOL) \
|
||||||
? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
|
? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
|
||||||
: 0), \
|
: 0), \
|
||||||
(x))
|
(x))
|
||||||
|
@ -305,16 +305,22 @@ SCM_API SCM scm_gentemp (SCM prefix, SCM obarray);
|
||||||
|
|
||||||
#define SCM_CELL_WORD_LOC(x, n) ((scm_t_bits*)SCM_CELL_OBJECT_LOC((x),(n)))
|
#define SCM_CELL_WORD_LOC(x, n) ((scm_t_bits*)SCM_CELL_OBJECT_LOC((x),(n)))
|
||||||
|
|
||||||
#define SCM_FALSEP(x) (SCM_EQ_P ((x), SCM_BOOL_F))
|
/* Deprecated because they do not follow the naming convention. that
|
||||||
#define SCM_NFALSEP(x) (!SCM_FALSEP (x))
|
is, they endiin "P" but return a C boolean. Also, SCM_BOOLP
|
||||||
|
evaluates its argument twice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define SCM_FALSEP scm_is_false
|
||||||
|
#define SCM_NFALSEP scm_is_true
|
||||||
|
#define SCM_BOOLP scm_is_bool
|
||||||
|
#define SCM_EQ_P scm_is_eq
|
||||||
|
|
||||||
#define SCM_BOOLP(x) (SCM_EQ_P ((x), SCM_BOOL_F) || SCM_EQ_P ((x), SCM_BOOL_T))
|
|
||||||
|
|
||||||
/* Convert from a C boolean to a SCM boolean value */
|
/* Convert from a C boolean to a SCM boolean value */
|
||||||
#define SCM_BOOL(f) ((f) ? SCM_BOOL_T : SCM_BOOL_F)
|
#define SCM_BOOL scm_from_bool
|
||||||
|
|
||||||
/* Convert from a C boolean to a SCM boolean value and negate it */
|
/* Convert from a C boolean to a SCM boolean value and negate it */
|
||||||
#define SCM_NEGATE_BOOL(f) ((f) ? SCM_BOOL_F : SCM_BOOL_T)
|
#define SCM_NEGATE_BOOL(f) scm_from_bool(!(f))
|
||||||
|
|
||||||
/* SCM_BOOL_NOT returns the other boolean.
|
/* SCM_BOOL_NOT returns the other boolean.
|
||||||
* The order of ^s here is important for Borland C++ (!?!?!)
|
* The order of ^s here is important for Borland C++ (!?!?!)
|
||||||
|
@ -328,6 +334,7 @@ SCM_API SCM scm_gentemp (SCM prefix, SCM obarray);
|
||||||
|
|
||||||
SCM_API SCM SCM_MAKINUM (scm_t_signed_bits val);
|
SCM_API SCM SCM_MAKINUM (scm_t_signed_bits val);
|
||||||
SCM_API int SCM_INUMP (SCM obj);
|
SCM_API int SCM_INUMP (SCM obj);
|
||||||
|
#define SCM_NINUMP(x) (!SCM_INUMP(x))
|
||||||
SCM_API scm_t_signed_bits SCM_INUM (SCM obj);
|
SCM_API scm_t_signed_bits SCM_INUM (SCM obj);
|
||||||
|
|
||||||
#define SCM_VALIDATE_INUM(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, INUMP, "exact integer")
|
#define SCM_VALIDATE_INUM(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, INUMP, "exact integer")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue