mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* struct.c (scm_print_struct): Use scm_printer_apply to call the
user defined struct printer.
This commit is contained in:
parent
c4f37e8038
commit
1e8f77cd7b
1 changed files with 1 additions and 2 deletions
|
@ -606,7 +606,7 @@ scm_print_struct (exp, port, pstate)
|
||||||
{
|
{
|
||||||
SCM prt = SCM_CDR (struct_printer_var);
|
SCM prt = SCM_CDR (struct_printer_var);
|
||||||
if (SCM_FALSEP(prt) ||
|
if (SCM_FALSEP(prt) ||
|
||||||
SCM_FALSEP(scm_apply (prt, exp, scm_cons (port, scm_listofnull))))
|
SCM_FALSEP(scm_printer_apply (prt, exp, port, pstate)))
|
||||||
{
|
{
|
||||||
scm_gen_write (scm_regular_string, "#<struct ", sizeof ("#<struct ") - 1,
|
scm_gen_write (scm_regular_string, "#<struct ", sizeof ("#<struct ") - 1,
|
||||||
port);
|
port);
|
||||||
|
@ -624,4 +624,3 @@ scm_init_struct ()
|
||||||
struct_printer_var = scm_sysintern("*struct-printer*", SCM_BOOL_F);
|
struct_printer_var = scm_sysintern("*struct-printer*", SCM_BOOL_F);
|
||||||
#include "struct.x"
|
#include "struct.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue