1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* Removed some more references to SCM_CHARS.

* Provided SCM_U?VECTOR_BASE as replacements for SCM_VELTS.
This commit is contained in:
Dirk Herrmann 2000-09-26 19:20:39 +00:00
parent a002f1a2cb
commit 3db4adfced
4 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,11 @@
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

View file

@ -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)

View file

@ -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

View file

@ -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)))