1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

* gc.h (SCM_VALIDATE_CELL): Don't "use" the value returned by

abort ().
(SCM_CARLOC, SCM_CDRLOC): Define directly instead of using
SCM_CELL_OBJECT_0 and SCM_CELL_OBJECT_1.  It's not correct to take
the address of these expressions since they use SCM_VALIDATE_CELL.
(Thanks to Bernard Urban.)
This commit is contained in:
Mikael Djurfeldt 2000-06-02 23:47:11 +00:00
parent f8d4d8e593
commit 217883aa45

View file

@ -86,7 +86,7 @@ typedef scm_cell * SCM_CELLPTR;
*/ */
#define SCM_VALIDATE_CELL(x) \ #define SCM_VALIDATE_CELL(x) \
(SCM_DEBUG_CELL_ACCESSES ? (!scm_cellp (x) ? abort () : 1) : 1) (SCM_DEBUG_CELL_ACCESSES ? (!scm_cellp (x) ? (abort (), 0) : 1) : 1)
#define SCM_CELL_WORD(x, n) \ #define SCM_CELL_WORD(x, n) \
((SCM_VALIDATE_CELL (x)), \ ((SCM_VALIDATE_CELL (x)), \
@ -133,8 +133,8 @@ typedef scm_cell * SCM_CELLPTR;
(SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y)))) (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
#define SCM_CELL_WORD_LOC(x, n) (&SCM_CELL_WORD (x, n)) #define SCM_CELL_WORD_LOC(x, n) (&SCM_CELL_WORD (x, n))
#define SCM_CARLOC(x) (&SCM_CAR (x)) #define SCM_CARLOC(x) (&SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [0]))
#define SCM_CDRLOC(x) (&SCM_CDR (x)) #define SCM_CDRLOC(x) (&SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [1]))
/* SCM_PTR_LT and friends define how to compare two SCM_CELLPTRs (which may /* SCM_PTR_LT and friends define how to compare two SCM_CELLPTRs (which may