mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
add printer for dynamic-states
* libguile/fluids.c: * libguile/fluids.h: * libguile/print.c: Add dynamic-state printing infrastructure.
This commit is contained in:
parent
9ea31741da
commit
45cf242872
3 changed files with 12 additions and 0 deletions
|
@ -112,6 +112,14 @@ scm_i_fluid_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
|||
scm_putc ('>', port);
|
||||
}
|
||||
|
||||
void
|
||||
scm_i_dynamic_state_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||
{
|
||||
scm_puts ("#<dynamic-state ", port);
|
||||
scm_intprint (SCM_UNPACK (exp), 16, port);
|
||||
scm_putc ('>', port);
|
||||
}
|
||||
|
||||
static size_t
|
||||
next_fluid_num ()
|
||||
{
|
||||
|
|
|
@ -78,6 +78,7 @@ SCM_API SCM scm_with_dynamic_state (SCM state, SCM proc);
|
|||
SCM_INTERNAL SCM scm_i_make_initial_dynamic_state (void);
|
||||
|
||||
SCM_INTERNAL void scm_i_fluid_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_i_dynamic_state_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_init_fluids (void);
|
||||
|
||||
#endif /* SCM_FLUIDS_H */
|
||||
|
|
|
@ -715,6 +715,9 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
|||
case scm_tc7_fluid:
|
||||
scm_i_fluid_print (exp, port, pstate);
|
||||
break;
|
||||
case scm_tc7_dynamic_state:
|
||||
scm_i_dynamic_state_print (exp, port, pstate);
|
||||
break;
|
||||
case scm_tc7_wvect:
|
||||
ENTER_NESTED_DATA (pstate, exp, circref);
|
||||
if (SCM_IS_WHVEC (exp))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue