mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Don't cast SCM values to pointers.
This commit is contained in:
parent
95c9e176a6
commit
8246bf3eba
2 changed files with 6 additions and 2 deletions
|
@ -78,8 +78,8 @@ 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*)(SCM_CDR(X)))
|
||||
#define SCM_STRUCT_VTABLE_DATA(X) ((SCM *)(SCM_UNPACK (SCM_CAR(X)) - 1))
|
||||
#define SCM_STRUCT_DATA(X) ((SCM *) SCM2PTR (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])
|
||||
#define SCM_STRUCT_PRINTER(X) (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_printer])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue