1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

print: avoid triggering deprecation warnings when printing weak vectors.

* libguile/print.c (iprin1): Use 'scm_c_weak_vector_ref' to access
  elements of weak vectors.
This commit is contained in:
Mark H Weaver 2014-04-24 17:55:47 -04:00
parent fd584ec670
commit 4755604501

View file

@ -752,7 +752,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
`SIMPLE_VECTOR_REF ()' macro. */
for (i = 0; i < last; ++i)
{
scm_iprin1 (scm_c_vector_ref (exp, i),
scm_iprin1 (scm_c_weak_vector_ref (exp, i),
port, pstate);
scm_putc (' ', port);
}
@ -769,7 +769,10 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
if (i == last)
{
/* CHECK_INTS; */
scm_iprin1 (scm_c_vector_ref (exp, i), port, pstate);
scm_iprin1 (SCM_I_WVECTP (exp)
? scm_c_weak_vector_ref (exp, i)
: SCM_SIMPLE_VECTOR_REF (exp, i),
port, pstate);
}
if (cutp)
scm_puts (" ...", port);