From 217883aa45a1f4b41577866593cc6a1be239cb41 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Fri, 2 Jun 2000 23:47:11 +0000 Subject: [PATCH] * 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.) --- libguile/gc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libguile/gc.h b/libguile/gc.h index 3b0706686..c67edfddf 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -86,7 +86,7 @@ typedef scm_cell * SCM_CELLPTR; */ #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) \ ((SCM_VALIDATE_CELL (x)), \ @@ -133,8 +133,8 @@ typedef scm_cell * SCM_CELLPTR; (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_CARLOC(x) (&SCM_CAR (x)) -#define SCM_CDRLOC(x) (&SCM_CDR (x)) +#define SCM_CARLOC(x) (&SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [0])) +#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