summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/ChangeLog8
-rw-r--r--libguile/eval.c14
-rw-r--r--libguile/unif.h2
-rw-r--r--libguile/vectors.h1
4 files changed, 18 insertions, 7 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 5f7aa99ff..c3c13dfe9 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,13 @@
2000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
+ * eval.c (scm_m_letrec1, SCM_CEVAL, SCM_APPLY): Use
+ SCM_STRING_U?CHARS or SCM_SYMBOL_U?CHARS instead of SCM_U?CHARS.
+
+ * unif.h (SCM_UVECTOR_BASE), vectors.h (SCM_VECTOR_BASE): Added
+ as replacements for SCM_CHARS and SCM_VELTS.
+
+2000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
* continuations.c (scm_make_cont, scm_dynthrow), print.c
(scm_iprin1), stacks.c (scm_make_stack, scm_stack_id,
scm_last_stack_frame): For continuations, use SCM_CONTREGS
diff --git a/libguile/eval.c b/libguile/eval.c
index eb10b3459..6a2b58953 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -916,7 +916,7 @@ static SCM
scm_m_letrec1 (SCM op, SCM imm, SCM xorig, SCM env)
{
SCM cdrx = SCM_CDR (xorig); /* locally mutable version of form */
- char *what = SCM_CHARS (SCM_CAR (xorig));
+ char *what = SCM_SYMBOL_CHARS (SCM_CAR (xorig));
SCM x = cdrx, proc, arg1; /* structure traversers */
SCM vars = SCM_EOL, inits = SCM_EOL, *initloc = &inits;
@@ -2761,15 +2761,15 @@ evapply:
#endif
floerr:
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), t.arg1,
- SCM_ARG1, SCM_CHARS (SCM_SNAME (proc)));
+ SCM_ARG1, SCM_SYMBOL_CHARS (SCM_SNAME (proc)));
}
proc = SCM_SNAME (proc);
{
- char *chrs = SCM_CHARS (proc) + SCM_LENGTH (proc) - 1;
+ char *chrs = SCM_SYMBOL_CHARS (proc) + SCM_LENGTH (proc) - 1;
while ('c' != *--chrs)
{
SCM_ASSERT (SCM_CONSP (t.arg1),
- t.arg1, SCM_ARG1, SCM_CHARS (proc));
+ t.arg1, SCM_ARG1, SCM_SYMBOL_CHARS (proc));
t.arg1 = ('a' == *chrs) ? SCM_CAR (t.arg1) : SCM_CDR (t.arg1);
}
RETURN (t.arg1);
@@ -3392,15 +3392,15 @@ tail:
#endif
floerr:
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
- SCM_ARG1, SCM_CHARS (SCM_SNAME (proc)));
+ SCM_ARG1, SCM_SYMBOL_CHARS (SCM_SNAME (proc)));
}
proc = SCM_SNAME (proc);
{
- char *chrs = SCM_CHARS (proc) + SCM_LENGTH (proc) - 1;
+ char *chrs = SCM_SYMBOL_CHARS (proc) + SCM_LENGTH (proc) - 1;
while ('c' != *--chrs)
{
SCM_ASSERT (SCM_CONSP (arg1),
- arg1, SCM_ARG1, SCM_CHARS (proc));
+ arg1, SCM_ARG1, SCM_SYMBOL_CHARS (proc));
arg1 = ('a' == *chrs) ? SCM_CAR (arg1) : SCM_CDR (arg1);
}
RETURN (arg1)
diff --git a/libguile/unif.h b/libguile/unif.h
index d67654a73..fd80f8b56 100644
--- a/libguile/unif.h
+++ b/libguile/unif.h
@@ -85,6 +85,8 @@ extern long scm_tc16_array;
#define SCM_ARRAY_BASE(a) (((scm_array *) SCM_CELL_WORD_1 (a))->base)
#define SCM_ARRAY_DIMS(a) ((scm_array_dim *)(SCM_CHARS(a)+sizeof(scm_array)))
+#define SCM_UVECTOR_BASE(x) ((void *) (SCM_CELL_WORD_1 (x)))
+
/* apparently it's possible to have more than SCM_LENGTH_MAX elements
in an array: if the length is SCM_LENGTH_MAX then the SCM_VELTS
block begins with the true length (a long int). I wonder if it
diff --git a/libguile/vectors.h b/libguile/vectors.h
index fef91cfa5..3e8708472 100644
--- a/libguile/vectors.h
+++ b/libguile/vectors.h
@@ -52,6 +52,7 @@
#define SCM_VECTORP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_vector))
+#define SCM_VECTOR_BASE(x) ((scm_bits_t *) SCM_CELL_WORD_1 (x))
#define SCM_VELTS(x) ((SCM *) SCM_CELL_WORD_1 (x))
#define SCM_VELTS_AS_STACKITEMS(x) ((SCM_STACKITEM *) SCM_CELL_WORD_1 (x))
#define SCM_SETVELTS(x,v) (SCM_SET_CELL_WORD_1 ((x), (v)))