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 vtable name.
This commit is contained in:
parent
fe970d8448
commit
a1ae1799ac
1 changed files with 9 additions and 2 deletions
|
@ -702,8 +702,15 @@ scm_print_struct (exp, port, pstate)
|
||||||
scm_printer_apply (SCM_STRUCT_PRINTER (exp), exp, port, pstate);
|
scm_printer_apply (SCM_STRUCT_PRINTER (exp), exp, port, pstate);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scm_lfwrite ("#<struct ", sizeof ("#<struct ") - 1, port);
|
SCM vtable = SCM_STRUCT_VTABLE (exp);
|
||||||
scm_intprint (SCM_STRUCT_VTABLE (exp), 16, port);
|
SCM name = scm_struct_vtable_name (vtable);
|
||||||
|
scm_puts ("#<", port);
|
||||||
|
if (SCM_NFALSEP (name))
|
||||||
|
scm_display (name, port);
|
||||||
|
else
|
||||||
|
scm_puts ("struct", port);
|
||||||
|
scm_putc (' ', port);
|
||||||
|
scm_intprint (vtable, 16, port);
|
||||||
scm_putc (':', port);
|
scm_putc (':', port);
|
||||||
scm_intprint (exp, 16, port);
|
scm_intprint (exp, 16, port);
|
||||||
scm_putc ('>', port);
|
scm_putc ('>', port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue