summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/ChangeLog7
-rw-r--r--libguile/gc.c2
-rw-r--r--libguile/hash.c2
-rw-r--r--libguile/macros.c2
-rw-r--r--libguile/objects.c4
-rw-r--r--libguile/options.c2
-rw-r--r--libguile/print.c4
-rw-r--r--libguile/strports.c2
-rw-r--r--libguile/throw.c3
9 files changed, 17 insertions, 11 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 3578be462..865b140e2 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,12 @@
2000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
+ * gc.c (free_list_length), hash.c (scm_hasher), macros.c
+ (scm_macro_type), objects.c (scm_class_of), options.c
+ (scm_options), print.c (scm_iprin1), strports.c (st_seek), throw.c
+ (SCM_LAZY_CATCH_P): Replace SCM_UNPACK_CAR appropriately.
+
+2000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
* eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
SCM_UNPACK_CAR with SCM_CELL_TYPE or SCM_CELL_WORD_0.
diff --git a/libguile/gc.c b/libguile/gc.c
index a60435d63..353bcee00 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -375,7 +375,7 @@ free_list_length (char *title, int i, SCM freelist)
SCM ls;
int n = 0;
for (ls = freelist; SCM_NNULLP (ls); ls = SCM_CDR (ls))
- if (SCM_UNPACK_CAR (ls) == scm_tc_free_cell)
+ if (SCM_CELL_TYPE (ls) == scm_tc_free_cell)
++n;
else
{
diff --git a/libguile/hash.c b/libguile/hash.c
index cdf8d8d0c..a70f4ceaa 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -145,7 +145,7 @@ scm_hasher(SCM obj, unsigned long n, scm_sizet d)
if (d) return (scm_hasher(SCM_CAR(obj), n, d/2)+scm_hasher(SCM_CDR(obj), n, d/2)) % n;
else return 1;
case scm_tc7_port:
- return ((SCM_RDNG & SCM_UNPACK_CAR(obj)) ? 260 : 261) % n;
+ return ((SCM_RDNG & SCM_CELL_WORD_0 (obj)) ? 260 : 261) % n;
case scm_tcs_closures:
case scm_tc7_contin:
case scm_tcs_subrs:
diff --git a/libguile/macros.c b/libguile/macros.c
index f02090161..00cffcf07 100644
--- a/libguile/macros.c
+++ b/libguile/macros.c
@@ -135,7 +135,7 @@ SCM_DEFINE (scm_macro_type, "macro-type", 1, 0, 0,
{
if (!(SCM_NIMP (m) && SCM_TYP16 (m) == scm_tc16_macro))
return SCM_BOOL_F;
- switch ((int) (SCM_UNPACK_CAR (m) >> 16))
+ switch (SCM_CELL_WORD_0 (m) >> 16)
{
case 0: return scm_sym_syntax;
case 1: return scm_sym_macro;
diff --git a/libguile/objects.c b/libguile/objects.c
index 083a18b43..568e25a9e 100644
--- a/libguile/objects.c
+++ b/libguile/objects.c
@@ -167,8 +167,8 @@ scm_class_of (SCM x)
/* fall through to ports */
}
case scm_tc7_port:
- return scm_port_class[(SCM_WRTNG & SCM_UNPACK_CAR (x)
- ? (SCM_RDNG & SCM_UNPACK_CAR (x)
+ return scm_port_class[(SCM_WRTNG & SCM_CELL_WORD_0 (x)
+ ? (SCM_RDNG & SCM_CELL_WORD_0 (x)
? SCM_INOUT_PCLASS_INDEX | SCM_PTOBNUM (x)
: SCM_OUT_PCLASS_INDEX | SCM_PTOBNUM (x))
: SCM_IN_PCLASS_INDEX | SCM_PTOBNUM (x))];
diff --git a/libguile/options.c b/libguile/options.c
index a727403dc..0242c62ed 100644
--- a/libguile/options.c
+++ b/libguile/options.c
@@ -185,7 +185,7 @@ scm_options (SCM arg, scm_option options[], int n, const char *s)
goto cont;
case SCM_OPTION_SCM:
new_mode = SCM_CDR (new_mode);
- flags[i] = SCM_UNPACK_CAR (new_mode);
+ flags[i] = SCM_UNPACK (SCM_CAR (new_mode));
goto cont;
}
#ifndef SCM_RECKLESS
diff --git a/libguile/print.c b/libguile/print.c
index a243b4ec0..aab922b2e 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -407,11 +407,11 @@ taloop:
env = SCM_ENV (SCM_CDR (exp));
scm_puts ("#<", port);
}
- if (SCM_UNPACK_CAR(exp) & (3L << 16))
+ if (SCM_CELL_WORD_0 (exp) & (3L << 16))
scm_puts ("macro", port);
else
scm_puts ("syntax", port);
- if (SCM_UNPACK_CAR (exp) & (2L << 16))
+ if (SCM_CELL_WORD_0 (exp) & (2L << 16))
scm_putc ('!', port);
}
else
diff --git a/libguile/strports.c b/libguile/strports.c
index 33ed1b4ee..127dc1d77 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -213,7 +213,7 @@ st_seek (SCM port, off_t offset, int whence)
if (target >= pt->write_buf_size)
{
- if (!(SCM_UNPACK_CAR (port) & SCM_WRTNG))
+ if (!(SCM_CELL_WORD_0 (port) & SCM_WRTNG))
{
if (target > pt->write_buf_size)
{
diff --git a/libguile/throw.c b/libguile/throw.c
index 78be35a4e..fc42886ba 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -260,8 +260,7 @@ make_lazy_catch (struct lazy_catch *c)
SCM_RETURN_NEWSMOB (tc16_lazy_catch, c);
}
-#define SCM_LAZY_CATCH_P(obj) \
- (SCM_NIMP (obj) && (SCM_UNPACK_CAR (obj) == tc16_lazy_catch))
+#define SCM_LAZY_CATCH_P(obj) (SCM_SMOB_PREDICATE (tc16_lazy_catch, obj))
/* Exactly like scm_internal_catch, except: