diff options
author | Andy Wingo <wingo@pobox.com> | 2011-11-18 10:50:35 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-07-06 18:32:14 +0200 |
commit | 66b1dbf649c82e34aa6d62a982cae3218419d160 (patch) | |
tree | 17811ca9a3a9026f643117d526adb0b536b9530b | |
parent | d192791373b79e905eb02f9c0b01413051a7b2f8 (diff) | |
download | guile-66b1dbf649c82e34aa6d62a982cae3218419d160.tar.gz |
simplify scm_init_print
* libguile/print.c (scm_init_print): Simplify creation of print-state
vtable.
-rw-r--r-- | libguile/print.c | 8 |
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; |