summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-18 10:50:35 +0100
committerAndy Wingo <wingo@pobox.com>2012-07-06 18:32:14 +0200
commit66b1dbf649c82e34aa6d62a982cae3218419d160 (patch)
tree17811ca9a3a9026f643117d526adb0b536b9530b /libguile/print.c
parentd192791373b79e905eb02f9c0b01413051a7b2f8 (diff)
downloadguile-66b1dbf649c82e34aa6d62a982cae3218419d160.tar.gz
simplify scm_init_print
* libguile/print.c (scm_init_print): Simplify creation of print-state vtable.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 2fc536b02..cb3c0b95a 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -1544,14 +1544,12 @@ SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0,
void
scm_init_print ()
{
- SCM vtable, layout, type;
+ SCM type;
scm_gc_register_root (&print_state_pool);
scm_gc_register_root (&scm_print_state_vtable);
- vtable = scm_make_vtable_vtable (scm_nullstr, SCM_INUM0, SCM_EOL);
- layout =
- scm_make_struct_layout (scm_from_locale_string (SCM_PRINT_STATE_LAYOUT));
- type = scm_make_struct (vtable, SCM_INUM0, scm_list_1 (layout));
+ type = scm_make_vtable (scm_from_locale_string (SCM_PRINT_STATE_LAYOUT),
+ SCM_BOOL_F);
scm_set_struct_vtable_name_x (type, scm_from_latin1_symbol ("print-state"));
scm_print_state_vtable = type;