mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* gc.h, tags.h: Be kind to compilers which must see hash signs in
column 0. (Thanks to Ian Grant.)
This commit is contained in:
parent
9ea8cdcb43
commit
076d6063fa
2 changed files with 10 additions and 10 deletions
|
@ -74,11 +74,11 @@ typedef scm_cell * SCM_CELLPTR;
|
|||
* pointers to scm_vector elts, functions, &c are not munged.
|
||||
*/
|
||||
#ifdef _UNICOS
|
||||
#define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x) >> 3))
|
||||
#define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
|
||||
# define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x) >> 3))
|
||||
# define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
|
||||
#else
|
||||
#define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x)))
|
||||
#define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
|
||||
# define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x)))
|
||||
# define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
|
||||
#endif /* def _UNICOS */
|
||||
|
||||
|
||||
|
|
|
@ -66,23 +66,23 @@ typedef long scm_bits_t;
|
|||
#if (SCM_DEBUG_TYPING_STRICTNESS == 1)
|
||||
typedef union { struct { scm_bits_t n; } n; } SCM;
|
||||
static SCM scm_pack(scm_bits_t b) { SCM s; s.n.n = b; return s; }
|
||||
#define SCM_UNPACK(x) ((x).n.n)
|
||||
#define SCM_PACK(x) (scm_pack ((scm_bits_t) (x)))
|
||||
# define SCM_UNPACK(x) ((x).n.n)
|
||||
# define SCM_PACK(x) (scm_pack ((scm_bits_t) (x)))
|
||||
#elif defined (SCM_VOIDP_TEST)
|
||||
/* This is the default, which provides an intermediate level of compile time
|
||||
* type checking while still resulting in very efficient code.
|
||||
*/
|
||||
typedef void * SCM;
|
||||
#define SCM_UNPACK(x) ((scm_bits_t) (x))
|
||||
#define SCM_PACK(x) ((SCM) (x))
|
||||
# define SCM_UNPACK(x) ((scm_bits_t) (x))
|
||||
# define SCM_PACK(x) ((SCM) (x))
|
||||
#else
|
||||
/* This should be used as a fall back solution for machines on which casting
|
||||
* to a pointer may lead to loss of bit information, e. g. in the three least
|
||||
* significant bits.
|
||||
*/
|
||||
typedef scm_bits_t SCM;
|
||||
#define SCM_UNPACK(x) (x)
|
||||
#define SCM_PACK(x) ((scm_bits_t) (x))
|
||||
# define SCM_UNPACK(x) (x)
|
||||
# define SCM_PACK(x) ((scm_bits_t) (x))
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue