diff options
author | Greg J. Badros <gjb@cs.washington.edu> | 2000-03-09 18:58:58 +0000 |
---|---|---|
committer | Greg J. Badros <gjb@cs.washington.edu> | 2000-03-09 18:58:58 +0000 |
commit | c209c88e54d08a557a297836200e16e20355df02 (patch) | |
tree | dce0d672bc0a63be5f658c65269c9a4144da1c67 /libguile/objects.c | |
parent | df8bb2dc3988d24c0f64bd2cc5fa01a31825d11a (diff) | |
download | guile-c209c88e54d08a557a297836200e16e20355df02.tar.gz |
*.[ch]: make a distinction between SCM as a generic
name for a Scheme object (now a void*), and SCM as 32 bit word for
storing tags and immediates (now a long int). Introduced
SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
code in the process: arbiter.c (use macros), unif.c (scm_array_p),
Diffstat (limited to 'libguile/objects.c')
-rw-r--r-- | libguile/objects.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/objects.c b/libguile/objects.c index 16a8c0b8c..2d52b0b93 100644 --- a/libguile/objects.c +++ b/libguile/objects.c @@ -157,10 +157,10 @@ scm_class_of (SCM x) case scm_tc7_smob: { - SCM type = SCM_TYP16 (x); + long type = SCM_TYP16 (x); if (type == scm_tc16_flo) { - if (SCM_CAR (x) & SCM_IMAG_PART) + if (SCM_CARW (x) & SCM_IMAG_PART) return scm_class_complex; else return scm_class_real; @@ -171,8 +171,8 @@ scm_class_of (SCM x) /* fall through to ports */ } case scm_tc7_port: - return scm_port_class[(SCM_WRTNG & SCM_CAR (x) - ? (SCM_RDNG & SCM_CAR (x) + return scm_port_class[(SCM_WRTNG & SCM_CARW (x) + ? (SCM_RDNG & SCM_CARW (x) ? SCM_INOUT_PCLASS_INDEX | SCM_PTOBNUM (x) : SCM_OUT_PCLASS_INDEX | SCM_PTOBNUM (x)) : SCM_IN_PCLASS_INDEX | SCM_PTOBNUM (x))]; @@ -280,7 +280,7 @@ scm_mcache_lookup_cmethod (SCM cache, SCM args) if (SCM_NIMP (ls)) do { - i += (SCM_STRUCT_DATA (scm_class_of (SCM_CAR (ls))) + i += SCM_ASWORD (SCM_STRUCT_DATA (scm_class_of (SCM_CAR (ls))) [scm_si_hashsets + hashset]); ls = SCM_CDR (ls); } |