mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
Fixed printing of weak vectors.
* libguile/print.c (iprin1): When displaying a weak vector, access elements via `scm_c_vector_ref ()', not via the macro. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-14
This commit is contained in:
parent
d525e4f9a2
commit
c367c4b44e
1 changed files with 19 additions and 5 deletions
|
@ -625,16 +625,30 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
|||
last = pstate->length - 1;
|
||||
cutp = 1;
|
||||
}
|
||||
for (i = 0; i < last; ++i)
|
||||
if (SCM_I_WVECTP (exp))
|
||||
{
|
||||
/* CHECK_INTS; */
|
||||
scm_iprin1 (SCM_SIMPLE_VECTOR_REF (exp, i), port, pstate);
|
||||
scm_putc (' ', port);
|
||||
/* Elements of weak vectors may not be accessed via the
|
||||
`SIMPLE_VECTOR_REF ()' macro. */
|
||||
for (i = 0; i < last; ++i)
|
||||
{
|
||||
scm_iprin1 (scm_c_vector_ref (exp, i),
|
||||
port, pstate);
|
||||
scm_putc (' ', port);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < last; ++i)
|
||||
{
|
||||
scm_iprin1 (SCM_SIMPLE_VECTOR_REF (exp, i), port, pstate);
|
||||
scm_putc (' ', port);
|
||||
}
|
||||
}
|
||||
|
||||
if (i == last)
|
||||
{
|
||||
/* CHECK_INTS; */
|
||||
scm_iprin1 (SCM_SIMPLE_VECTOR_REF (exp, i), port, pstate);
|
||||
scm_iprin1 (scm_c_vector_ref (exp, i), port, pstate);
|
||||
}
|
||||
if (cutp)
|
||||
scm_puts (" ...", port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue