diff options
author | Andy Wingo <wingo@pobox.com> | 2011-11-18 10:50:35 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-11-24 11:47:35 +0100 |
commit | 231dd356162ba2ab1f67666fa40953fae538d107 (patch) | |
tree | fd4d6300ed581fe25f4fda7227d69f319290f5d5 | |
parent | bb9b357e2b98cea82f844115ee5f66704bb6a1c8 (diff) | |
download | guile-231dd356162ba2ab1f67666fa40953fae538d107.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 6e1ff802f..856e8c90e 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -1520,7 +1520,7 @@ SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0, void scm_init_print () { - SCM vtable, layout, type; + SCM type; scm_init_opts (scm_print_options, scm_print_opts); @@ -1531,10 +1531,8 @@ scm_init_print () 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; |