mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +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;
|
last = pstate->length - 1;
|
||||||
cutp = 1;
|
cutp = 1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < last; ++i)
|
if (SCM_I_WVECTP (exp))
|
||||||
{
|
{
|
||||||
/* CHECK_INTS; */
|
/* Elements of weak vectors may not be accessed via the
|
||||||
scm_iprin1 (SCM_SIMPLE_VECTOR_REF (exp, i), port, pstate);
|
`SIMPLE_VECTOR_REF ()' macro. */
|
||||||
scm_putc (' ', port);
|
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)
|
if (i == last)
|
||||||
{
|
{
|
||||||
/* CHECK_INTS; */
|
/* CHECK_INTS; */
|
||||||
scm_iprin1 (SCM_SIMPLE_VECTOR_REF (exp, i), port, pstate);
|
scm_iprin1 (scm_c_vector_ref (exp, i), port, pstate);
|
||||||
}
|
}
|
||||||
if (cutp)
|
if (cutp)
|
||||||
scm_puts (" ...", port);
|
scm_puts (" ...", port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue