1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 08:40:19 +02:00

Don't use SCM2PTR for non scheme values.

This commit is contained in:
Dirk Herrmann 2000-03-22 10:27:36 +00:00
parent 6f29dc6d2f
commit 1ff2fa6e1a
5 changed files with 14 additions and 8 deletions

View file

@ -78,7 +78,7 @@ typedef scm_sizet (*scm_struct_free_t) (SCM *vtable, SCM *data);
(no hidden words) */
#define SCM_STRUCTP(X) (SCM_NIMP(X) && (SCM_TYP3(X) == scm_tc3_cons_gloc))
#define SCM_STRUCT_DATA(X) ((SCM *) SCM2PTR (SCM_CDR (X)))
#define SCM_STRUCT_DATA(X) ((SCM *) SCM_UNPACK (SCM_CDR (X)))
#define SCM_STRUCT_VTABLE_DATA(X) ((SCM *) (SCM_UNPACK (SCM_CAR (X)) - 1))
#define SCM_STRUCT_LAYOUT(X) (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_layout])
#define SCM_STRUCT_VTABLE(X) (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_vtable])