mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 07:30:32 +02:00
locking for putc, puts
* libguile/ports.c (scm_putc, scm_puts): * libguile/ports.h (scm_putc_unlocked, scm_puts_unlocked): Separate into _unlocked and locked variants. Change all callers to use the _unlocked versions.
This commit is contained in:
parent
4251ae2e28
commit
0607ebbfcf
44 changed files with 233 additions and 215 deletions
|
@ -981,22 +981,22 @@ scm_print_struct (SCM exp, SCM port, scm_print_state *pstate)
|
|||
{
|
||||
SCM vtable = SCM_STRUCT_VTABLE (exp);
|
||||
SCM name = scm_struct_vtable_name (vtable);
|
||||
scm_puts ("#<", port);
|
||||
scm_puts_unlocked ("#<", port);
|
||||
if (scm_is_true (name))
|
||||
{
|
||||
scm_display (name, port);
|
||||
scm_putc (' ', port);
|
||||
scm_putc_unlocked (' ', port);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SCM_VTABLE_FLAG_IS_SET (vtable, SCM_VTABLE_FLAG_VTABLE))
|
||||
scm_puts ("vtable:", port);
|
||||
scm_puts_unlocked ("vtable:", port);
|
||||
else
|
||||
scm_puts ("struct:", port);
|
||||
scm_puts_unlocked ("struct:", port);
|
||||
scm_uintprint (SCM_UNPACK (vtable), 16, port);
|
||||
scm_putc (' ', port);
|
||||
scm_putc_unlocked (' ', port);
|
||||
scm_write (SCM_VTABLE_LAYOUT (vtable), port);
|
||||
scm_putc (' ', port);
|
||||
scm_putc_unlocked (' ', port);
|
||||
}
|
||||
scm_uintprint (SCM_UNPACK (exp), 16, port);
|
||||
/* hackety hack */
|
||||
|
@ -1004,19 +1004,19 @@ scm_print_struct (SCM exp, SCM port, scm_print_state *pstate)
|
|||
{
|
||||
if (scm_is_true (SCM_STRUCT_PROCEDURE (exp)))
|
||||
{
|
||||
scm_puts (" proc: ", port);
|
||||
scm_puts_unlocked (" proc: ", port);
|
||||
if (scm_is_true (scm_procedure_p (SCM_STRUCT_PROCEDURE (exp))))
|
||||
scm_write (SCM_STRUCT_PROCEDURE (exp), port);
|
||||
else
|
||||
scm_puts ("(not a procedure?)", port);
|
||||
scm_puts_unlocked ("(not a procedure?)", port);
|
||||
}
|
||||
if (SCM_STRUCT_SETTER_P (exp))
|
||||
{
|
||||
scm_puts (" setter: ", port);
|
||||
scm_puts_unlocked (" setter: ", port);
|
||||
scm_write (SCM_STRUCT_SETTER (exp), port);
|
||||
}
|
||||
}
|
||||
scm_putc ('>', port);
|
||||
scm_putc_unlocked ('>', port);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue