mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
Don't use SCM2PTR for non scheme values.
This commit is contained in:
parent
6f29dc6d2f
commit
1ff2fa6e1a
5 changed files with 14 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
|
||||
non scheme values. If raw data is stored in SCM variables, it has
|
||||
to be accessed using SCM_UNPACK until a better solution is found.
|
||||
|
||||
2000-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||
|
||||
* tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of
|
||||
|
|
|
@ -185,8 +185,8 @@
|
|||
#define SCM_CPLXP(x) SCM_COMPLEXP(x) /* Deprecated */
|
||||
|
||||
#define SCM_REAL_VALUE(x) (((scm_double_t *) SCM2PTR (x))->real)
|
||||
#define SCM_COMPLEX_REAL(x) (((scm_complex_t *) SCM2PTR (SCM_CDR (x)))->real)
|
||||
#define SCM_COMPLEX_IMAG(x) (((scm_complex_t *) SCM2PTR (SCM_CDR (x)))->imag)
|
||||
#define SCM_COMPLEX_REAL(x) (((scm_complex_t *) SCM_UNPACK (SCM_CDR (x)))->real)
|
||||
#define SCM_COMPLEX_IMAG(x) (((scm_complex_t *) SCM_UNPACK (SCM_CDR (x)))->imag)
|
||||
#define SCM_REAL(x) \
|
||||
(SCM_SLOPPY_REALP (x) \
|
||||
? SCM_REAL_VALUE (x) \
|
||||
|
@ -257,7 +257,7 @@
|
|||
#define SCM_BIGSIGNFLAG 0x10000L
|
||||
#define SCM_BIGSIZEFIELD 17
|
||||
#define SCM_BIGSIGN(x) (SCM_UNPACK_CAR (x) & SCM_BIGSIGNFLAG)
|
||||
#define SCM_BDIGITS(x) ((SCM_BIGDIG *) SCM2PTR (SCM_CDR (x)))
|
||||
#define SCM_BDIGITS(x) ((SCM_BIGDIG *) SCM_UNPACK (SCM_CDR (x)))
|
||||
#define SCM_NUMDIGS(x) ((scm_sizet) (SCM_UNPACK_CAR (x) >> SCM_BIGSIZEFIELD))
|
||||
#define SCM_SETNUMDIGS(x, v, sign) \
|
||||
SCM_SETCAR (x, \
|
||||
|
|
|
@ -1325,8 +1325,8 @@ ramap_rp (SCM ra0,SCM proc,SCM ras)
|
|||
of a cell as raw data. Further: How can we be sure that
|
||||
the values fit into an inum?
|
||||
*/
|
||||
SCM n1 = SCM_MAKINUM (((long *) SCM2PTR (SCM_CDR (ra1)))[i1]);
|
||||
SCM n2 = SCM_MAKINUM (((long *) SCM2PTR (SCM_CDR (ra2)))[i2]);
|
||||
SCM n1 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra1)))[i1]);
|
||||
SCM n2 = SCM_MAKINUM (((long *) SCM_UNPACK (SCM_CDR (ra2)))[i2]);
|
||||
if (SCM_FALSEP (SCM_SUBRF (proc) (n1, n2)));
|
||||
SCM_BITVEC_CLR (ra0, i0);
|
||||
}
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
|
||||
#define SCM_VECTORP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_vector))
|
||||
#define SCM_NVECTORP(x) (!SCM_VECTORP (x))
|
||||
#define SCM_VELTS(x) ((SCM *) SCM2PTR (SCM_CDR (x)))
|
||||
#define SCM_VELTS_AS_STACKITEMS(x) ((SCM_STACKITEM *) SCM2PTR (SCM_CDR (x)))
|
||||
#define SCM_VELTS(x) ((SCM *) SCM_UNPACK (SCM_CDR (x)))
|
||||
#define SCM_VELTS_AS_STACKITEMS(x) ((SCM_STACKITEM *) SCM_UNPACK (SCM_CDR (x)))
|
||||
#define SCM_SETVELTS SCM_SETCDR
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue