summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-04-24 17:55:47 -0400
committerMark H Weaver <mhw@netris.org>2014-04-24 18:22:03 -0400
commit4755604501948008849dcc9e114e5c84f355624d (patch)
tree9b9fe105459220228c9dbda040fadeb468b8e6a8 /libguile/print.c
parentfd584ec6707ae5b6e7b07fe19443b513fb0ba62b (diff)
downloadguile-4755604501948008849dcc9e114e5c84f355624d.tar.gz
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.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 7e27f7670..122e03549 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -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);