mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
* struct.c (scm_struct_ref, scm_struct_set_x): Use
scm_struct_i_n_words to get the number of fields, not -scm_struct_n_extra_words. On the route to fancier struct printing: * struct.c (scm_print_struct): New function to print a structure. Include "genio.h" to support it. This function doesn't do anything interesting right now, but I think it should be here anyway. * struct.h: Include "print.h" and add prototype for scm_print_struct. * print.c (scm_iprin1): Call scm_print_struct instead of trying to print structures ourself.
This commit is contained in:
parent
ede1d9bf57
commit
bafcafb270
3 changed files with 41 additions and 5 deletions
|
@ -45,6 +45,7 @@
|
|||
|
||||
|
||||
#include "libguile/__scm.h"
|
||||
#include "libguile/print.h"
|
||||
|
||||
|
||||
|
||||
|
@ -81,6 +82,7 @@ extern SCM scm_struct_ref SCM_P ((SCM handle, SCM pos));
|
|||
extern SCM scm_struct_set_x SCM_P ((SCM handle, SCM pos, SCM val));
|
||||
extern SCM scm_struct_vtable SCM_P ((SCM handle));
|
||||
extern SCM scm_struct_vtable_tag SCM_P ((SCM handle));
|
||||
extern void scm_print_struct SCM_P ((SCM exp, SCM port, scm_print_state *));
|
||||
extern void scm_init_struct SCM_P ((void));
|
||||
|
||||
#endif /* STRUCTH */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue