1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00

* tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of

pointer-arithmetic induced by the SCM_PACK/UNPACK change.
This commit is contained in:
Mikael Djurfeldt 2000-03-22 02:12:47 +00:00
parent 998308d305
commit 8f9da2f9e9

View file

@ -291,14 +291,18 @@ typedef void * SCM;
/* SCM_ECONSP should be used instead of SCM_CONSP at places where GLOCS
* can be expected to occur.
*/
#define SCM_ECONSP(x) (SCM_NIMP (x) \
&& (SCM_SLOPPY_CONSP (x) \
|| (SCM_TYP3 (x) == 1 \
&& SCM_CDR (SCM_CAR (x) - 1) != 0)))
#define SCM_NECONSP(x) (SCM_IMP (x) \
|| (SCM_SLOPPY_NCONSP (x) \
&& (SCM_TYP3 (x) != 1 \
|| SCM_CDR (SCM_CAR (x) - 1) == 0)))
#define SCM_ECONSP(x) \
(SCM_NIMP (x) \
&& (SCM_SLOPPY_CONSP (x) \
|| (SCM_TYP3 (x) == 1 \
&& (SCM_CDR ((SCM) SCM_STRUCT_VTABLE_DATA (x)) \
!= (SCM) 0))))
#define SCM_NECONSP(x) \
(SCM_IMP (x) \
|| (SCM_SLOPPY_NCONSP (x) \
&& (SCM_TYP3 (x) != 1 \
|| (SCM_CDR ((SCM) SCM_STRUCT_VTABLE_DATA (x)) \
== (SCM) 0))))