summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-08-30 20:12:09 +0200
committerLudovic Courtès <ludo@gnu.org>2009-08-30 20:12:09 +0200
commit807e5a6641b2aa37ce4198a6c13f1aaebd3a5f25 (patch)
tree34ef7e574f4b2027e3971406e368e25628d475c0 /libguile/print.c
parentd6097d1d63a269ce960c47f81902aaaf26d46a64 (diff)
downloadguile-807e5a6641b2aa37ce4198a6c13f1aaebd3a5f25.tar.gz
Use a TC7 tag instead of a SMOB for bytevectors.
* libguile/bytevectors.c (scm_tc16_bytevector): Remove. (SCM_BYTEVECTOR_SET_LENGTH, SCM_BYTEVECTOR_SET_CONTENTS, SCM_BYTEVECTOR_SET_INLINE, SCM_BYTEVECTOR_SET_ELEMENT_TYPE, make_bytevector_from_buffer, scm_is_bytevector, scm_bootstrap_bytevectors): Adjust to the SMOB->tc7 change. (scm_i_print_bytevector): New, formerly `print_bytevector ()'. (bytevector_equal_p): Remove. * libguile/bytevectors.h (SCM_BYTEVECTOR_LENGTH, SCM_BYTEVECTOR_CONTENTS, SCM_BYTEVECTOR_P): Adjust to SMOB->tc7 change. (SCM_BYTEVECTOR_FLAGS, SCM_SET_BYTEVECTOR_FLAGS): New macros. (scm_tc16_bytevector): Remove declaration. (scm_i_print_bytevector): New declaration. * libguile/eq.c (scm_equal_p): Handle `scm_tc7_bytevector'. * libguile/evalext.c (scm_self_evaluating_p): Likewise. * libguile/print.c (iprin1): Likewise. * libguile/tags.h (scm_tc7_bytevector): New. (scm_tc7_unused_8): Remove. * libguile/validate.h (SCM_VALIDATE_BYTEVECTOR): Adjust. * test-suite/tests/bytevectors.test ("Datum Syntax")["self-evaluating?"]: New test.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/print.c b/libguile/print.c
index c38eba76e..3bb6cb167 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -739,6 +739,9 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
scm_puts ("#w(", port);
goto common_vector_printer;
+ case scm_tc7_bytevector:
+ scm_i_print_bytevector (exp, port, pstate);
+ break;
case scm_tc7_vector:
ENTER_NESTED_DATA (pstate, exp, circref);
scm_puts ("#(", port);