[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 12/15: Remove scm_putc_unlocked.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 12/15: Remove scm_putc_unlocked. |
Date: |
Tue, 26 Apr 2016 21:38:55 +0000 |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit 206b3f6e037a3e6d4eaa6401899cc48a51488657
Author: Andy Wingo <address@hidden>
Date: Tue Apr 26 23:01:14 2016 +0200
Remove scm_putc_unlocked.
* libguile/ports.h (scm_putc_unlocked): Remove.
* libguile/ports.c (scm_putc): Replace implementation with
scm_putc_unlocked's implementation.
(scm_port_print): Use scm_putc.
* libguile/arbiters.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/continuations.c:
* libguile/dynl.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/macros.c:
* libguile/mallocs.c:
* libguile/print.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/smob.c:
* libguile/srcprop.c:
* libguile/struct.c:
* libguile/variable.c:
* libguile/weak-set.c:
* libguile/weak-table.c: Use scm_putc instead of scm_putc_unlocked.
---
libguile/arbiters.c | 2 +-
libguile/arrays.c | 16 ++++++++--------
libguile/bitvectors.c | 2 +-
libguile/bytevectors.c | 8 ++++----
libguile/continuations.c | 2 +-
libguile/dynl.c | 2 +-
libguile/eval.c | 4 ++--
libguile/filesys.c | 2 +-
libguile/fluids.c | 4 ++--
libguile/foreign.c | 2 +-
libguile/fports.c | 6 +++---
libguile/frames.c | 2 +-
libguile/hashtab.c | 2 +-
libguile/hooks.c | 8 ++++----
libguile/macros.c | 2 +-
libguile/mallocs.c | 4 ++--
libguile/ports.c | 11 ++++-------
libguile/ports.h | 8 --------
libguile/print.c | 32 ++++++++++++++++----------------
libguile/programs.c | 8 ++++----
libguile/promises.c | 2 +-
libguile/r6rs-ports.c | 2 +-
libguile/smob.c | 4 ++--
libguile/srcprop.c | 2 +-
libguile/struct.c | 8 ++++----
libguile/variable.c | 2 +-
libguile/weak-set.c | 2 +-
libguile/weak-table.c | 2 +-
28 files changed, 70 insertions(+), 81 deletions(-)
diff --git a/libguile/arbiters.c b/libguile/arbiters.c
index 831e0a2..e25be44 100644
--- a/libguile/arbiters.c
+++ b/libguile/arbiters.c
@@ -93,7 +93,7 @@ arbiter_print (SCM exp, SCM port, scm_print_state *pstate)
if (SCM_ARB_LOCKED (exp))
scm_puts_unlocked ("locked ", port);
scm_iprin1 (SCM_PACK (SCM_SMOB_DATA (exp)), port, pstate);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return !0;
}
diff --git a/libguile/arrays.c b/libguile/arrays.c
index 4c1b824..52fe90a 100644
--- a/libguile/arrays.c
+++ b/libguile/arrays.c
@@ -735,15 +735,15 @@ scm_i_print_array_dimension (scm_t_array_handle *h, int
dim, int pos,
else
{
ssize_t i;
- scm_putc_unlocked ('(', port);
+ scm_putc ('(', port);
for (i = h->dims[dim].lbnd; i <= h->dims[dim].ubnd;
i++, pos += h->dims[dim].inc)
{
scm_i_print_array_dimension (h, dim+1, pos, port, pstate);
if (i < h->dims[dim].ubnd)
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
}
- scm_putc_unlocked (')', port);
+ scm_putc (')', port);
}
return 1;
}
@@ -760,7 +760,7 @@ scm_i_print_array (SCM array, SCM port, scm_print_state
*pstate)
scm_array_get_handle (array, &h);
- scm_putc_unlocked ('#', port);
+ scm_putc ('#', port);
if (SCM_I_ARRAYP (array))
scm_intprint (h.ndims, 10, port);
if (h.element_type != SCM_ARRAY_ELEMENT_TYPE_SCM)
@@ -781,12 +781,12 @@ scm_i_print_array (SCM array, SCM port, scm_print_state
*pstate)
{
if (print_lbnds)
{
- scm_putc_unlocked ('@', port);
+ scm_putc ('@', port);
scm_intprint (h.dims[i].lbnd, 10, port);
}
if (print_lens)
{
- scm_putc_unlocked (':', port);
+ scm_putc (':', port);
scm_intprint (h.dims[i].ubnd - h.dims[i].lbnd + 1,
10, port);
}
@@ -814,9 +814,9 @@ scm_i_print_array (SCM array, SCM port, scm_print_state
*pstate)
not really the same as Scheme values since they are boxed and
can be modified with array-set!, say.
*/
- scm_putc_unlocked ('(', port);
+ scm_putc ('(', port);
scm_i_print_array_dimension (&h, 0, 0, port, pstate);
- scm_putc_unlocked (')', port);
+ scm_putc (')', port);
return 1;
}
else
diff --git a/libguile/bitvectors.c b/libguile/bitvectors.c
index d594317..baa5e5e 100644
--- a/libguile/bitvectors.c
+++ b/libguile/bitvectors.c
@@ -62,7 +62,7 @@ scm_i_print_bitvector (SCM vec, SCM port, scm_print_state
*pstate)
{
scm_t_uint32 mask = 1;
for (j = 0; j < 32 && j < bit_len; j++, mask <<= 1)
- scm_putc_unlocked ((bits[i] & mask)? '1' : '0', port);
+ scm_putc ((bits[i] & mask)? '1' : '0', port);
}
return 1;
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index 41d5b6c..54eef8b 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -417,17 +417,17 @@ scm_i_print_bytevector (SCM bv, SCM port, scm_print_state
*pstate SCM_UNUSED)
scm_array_get_handle (bv, &h);
- scm_putc_unlocked ('#', port);
+ scm_putc ('#', port);
scm_write (scm_array_handle_element_type (&h), port);
- scm_putc_unlocked ('(', port);
+ scm_putc ('(', port);
for (i = h.dims[0].lbnd, ubnd = h.dims[0].ubnd, inc = h.dims[0].inc;
i <= ubnd; i += inc)
{
if (i > 0)
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_write (scm_array_handle_ref (&h, i), port);
}
- scm_putc_unlocked (')', port);
+ scm_putc (')', port);
return 1;
}
diff --git a/libguile/continuations.c b/libguile/continuations.c
index c0a2bd8..9efa435 100644
--- a/libguile/continuations.c
+++ b/libguile/continuations.c
@@ -96,7 +96,7 @@ continuation_print (SCM obj, SCM port, scm_print_state *state
SCM_UNUSED)
scm_intprint (continuation->num_stack_items, 10, port);
scm_puts_unlocked (" @ ", port);
scm_uintprint (SCM_SMOB_DATA_1 (obj), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/dynl.c b/libguile/dynl.c
index 79198e6..d557faa 100644
--- a/libguile/dynl.c
+++ b/libguile/dynl.c
@@ -233,7 +233,7 @@ dynl_obj_print (SCM exp, SCM port, scm_print_state *pstate)
scm_iprin1 (DYNL_FILENAME (exp), port, pstate);
if (DYNL_HANDLE (exp) == NULL)
scm_puts_unlocked (" (unlinked)", port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/eval.c b/libguile/eval.c
index 6f27519..dca790c 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -922,14 +922,14 @@ boot_closure_print (SCM closure, SCM port,
scm_print_state *pstate)
SCM args;
scm_puts_unlocked ("#<boot-closure ", port);
scm_uintprint (SCM_UNPACK (closure), 16, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
args = scm_make_list (scm_from_int (BOOT_CLOSURE_NUM_REQUIRED_ARGS
(closure)),
scm_from_latin1_symbol ("_"));
if (!BOOT_CLOSURE_IS_FIXED (closure) && BOOT_CLOSURE_HAS_REST_ARGS (closure))
args = scm_cons_star (scm_from_latin1_symbol ("_"), args);
/* FIXME: optionals and rests */
scm_display (args, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 167d444..c0acb8d 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1825,7 +1825,7 @@ scm_dir_print (SCM exp, SCM port, scm_print_state *pstate
SCM_UNUSED)
scm_puts_unlocked ("closed: ", port);
scm_puts_unlocked ("directory stream ", port);
scm_uintprint (SCM_SMOB_DATA_1 (exp), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/fluids.c b/libguile/fluids.c
index 4e0684a..d50fc54 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -81,7 +81,7 @@ scm_i_fluid_print (SCM exp, SCM port, scm_print_state *pstate
SCM_UNUSED)
{
scm_puts_unlocked ("#<fluid ", port);
scm_intprint ((int) FLUID_NUM (exp), 10, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
void
@@ -89,7 +89,7 @@ scm_i_dynamic_state_print (SCM exp, SCM port, scm_print_state
*pstate SCM_UNUSED
{
scm_puts_unlocked ("#<dynamic-state ", port);
scm_intprint (SCM_UNPACK (exp), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
diff --git a/libguile/foreign.c b/libguile/foreign.c
index 864019e..1f30cd8 100644
--- a/libguile/foreign.c
+++ b/libguile/foreign.c
@@ -315,7 +315,7 @@ scm_i_pointer_print (SCM pointer, SCM port, scm_print_state
*pstate)
{
scm_puts_unlocked ("#<pointer 0x", port);
scm_uintprint (scm_to_uintptr_t (scm_pointer_address (pointer)), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
diff --git a/libguile/fports.c b/libguile/fports.c
index efbcf73..59cabf2 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -556,7 +556,7 @@ fport_print (SCM exp, SCM port, scm_print_state *pstate
SCM_UNUSED)
scm_display (name, port);
else
scm_puts_unlocked (SCM_PTOBNAME (SCM_PTOBNUM (exp)), port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
fdes = (SCM_FSTREAM (exp))->fdes;
#if (defined HAVE_TTYNAME) && (defined HAVE_POSIX)
@@ -569,10 +569,10 @@ fport_print (SCM exp, SCM port, scm_print_state *pstate
SCM_UNUSED)
else
{
scm_puts_unlocked (SCM_PTOBNAME (SCM_PTOBNUM (exp)), port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_uintprint ((scm_t_bits) SCM_PTAB_ENTRY (exp), 16, port);
}
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/frames.c b/libguile/frames.c
index 534720f..221964f 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -49,7 +49,7 @@ scm_i_frame_print (SCM frame, SCM port, scm_print_state
*pstate)
if (scm_is_true (name))
{
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_write (name, port);
}
}
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 30d781f..cbeaed7 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -172,7 +172,7 @@ scm_i_hashtable_print (SCM exp, SCM port, scm_print_state
*pstate)
scm_uintprint (SCM_UNPACK (exp), 16, port);
scm_putc (' ', port);
scm_uintprint (SCM_HASHTABLE_N_ITEMS (exp), 10, port);
- scm_putc_unlocked ('/', port);
+ scm_putc ('/', port);
scm_uintprint (SCM_SIMPLE_VECTOR_LENGTH (SCM_HASHTABLE_VECTOR (exp)),
10, port);
scm_puts_unlocked (">", port);
diff --git a/libguile/hooks.c b/libguile/hooks.c
index 782636e..39b92ec 100644
--- a/libguile/hooks.c
+++ b/libguile/hooks.c
@@ -136,20 +136,20 @@ hook_print (SCM hook, SCM port, scm_print_state *pstate)
SCM ls, name;
scm_puts_unlocked ("#<hook ", port);
scm_intprint (SCM_HOOK_ARITY (hook), 10, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_uintprint (SCM_UNPACK (hook), 16, port);
ls = SCM_HOOK_PROCEDURES (hook);
while (scm_is_pair (ls))
{
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
name = scm_procedure_name (SCM_CAR (ls));
if (scm_is_true (name))
scm_iprin1 (name, port, pstate);
else
- scm_putc_unlocked ('?', port);
+ scm_putc ('?', port);
ls = SCM_CDR (ls);
}
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/macros.c b/libguile/macros.c
index 47b252d..c5807b6 100644
--- a/libguile/macros.c
+++ b/libguile/macros.c
@@ -53,7 +53,7 @@ macro_print (SCM macro, SCM port, scm_print_state *pstate)
else
scm_puts_unlocked ("#<syntax-transformer ", port);
scm_iprin1 (scm_macro_name (macro), port, pstate);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/mallocs.c b/libguile/mallocs.c
index 9f3584a..1dc751e 100644
--- a/libguile/mallocs.c
+++ b/libguile/mallocs.c
@@ -44,9 +44,9 @@ scm_t_bits scm_tc16_malloc;
static int
malloc_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
{
- scm_puts_unlocked("#<malloc ", port);
+ scm_puts_unlocked ("#<malloc ", port);
scm_uintprint (SCM_SMOB_DATA (exp), 16, port);
- scm_putc_unlocked('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/ports.c b/libguile/ports.c
index 58fe0f7..1076d76 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -2479,11 +2479,8 @@ SCM_DEFINE (scm_port_write_buffer, "port-write-buffer",
1, 0, 0,
void
scm_putc (char c, SCM port)
{
- scm_i_pthread_mutex_t *lock;
- scm_c_lock_port (port, &lock);
- scm_putc_unlocked (c, port);
- if (lock)
- scm_i_pthread_mutex_unlock (lock);
+ SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
+ scm_lfwrite_unlocked (&c, 1, port);
}
void
@@ -3023,9 +3020,9 @@ scm_port_print (SCM exp, SCM port, scm_print_state
*pstate SCM_UNUSED)
scm_puts_unlocked ("#<", port);
scm_print_port_mode (exp, port);
scm_puts_unlocked (type, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_uintprint (SCM_CELL_WORD_1 (exp), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/ports.h b/libguile/ports.h
index 4ea2c30..70bf3ad 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -324,7 +324,6 @@ SCM_INTERNAL SCM scm_port_write_buffer (SCM port);
/* Output. */
SCM_API void scm_putc (char c, SCM port);
-SCM_INLINE void scm_putc_unlocked (char c, SCM port);
SCM_API void scm_puts (const char *str_data, SCM port);
SCM_INLINE void scm_puts_unlocked (const char *str_data, SCM port);
SCM_API void scm_c_write (SCM port, const void *buffer, size_t size);
@@ -397,13 +396,6 @@ scm_c_try_lock_port (SCM port, scm_i_pthread_mutex_t
**lock)
}
SCM_INLINE_IMPLEMENTATION void
-scm_putc_unlocked (char c, SCM port)
-{
- SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
- scm_lfwrite_unlocked (&c, 1, port);
-}
-
-SCM_INLINE_IMPLEMENTATION void
scm_puts_unlocked (const char *s, SCM port)
{
SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
diff --git a/libguile/print.c b/libguile/print.c
index d950511..8c6b999 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -166,7 +166,7 @@ do
\
{ \
if (pstate->top - pstate->list_offset >= pstate->level) \
{ \
- scm_putc_unlocked ('#', port);
\
+ scm_putc ('#', port); \
return; \
} \
} \
@@ -310,9 +310,9 @@ print_circref (SCM port, scm_print_state *pstate, SCM ref)
for (i = pstate->top - 1; 1; --i)
if (scm_is_eq (PSTATE_STACK_REF(pstate, i), ref))
break;
- scm_putc_unlocked ('#', port);
+ scm_putc ('#', port);
scm_intprint (i - self, 10, port);
- scm_putc_unlocked ('#', port);
+ scm_putc ('#', port);
}
/* Print the name of a symbol. */
@@ -473,7 +473,7 @@ print_extended_symbol (SCM sym, SCM port)
{
scm_lfwrite_unlocked ("\\x", 2, port);
scm_intprint (c, 16, port);
- scm_putc_unlocked (';', port);
+ scm_putc (';', port);
}
}
@@ -489,7 +489,7 @@ print_r7rs_extended_symbol (SCM sym, SCM port)
len = scm_i_symbol_length (sym);
strategy = PORT_CONVERSION_HANDLER (port);
- scm_putc_unlocked ('|', port);
+ scm_putc ('|', port);
for (pos = 0; pos < len; pos++)
{
@@ -522,13 +522,13 @@ print_r7rs_extended_symbol (SCM sym, SCM port)
{
scm_lfwrite_unlocked ("\\x", 2, port);
scm_intprint (c, 16, port);
- scm_putc_unlocked (';', port);
+ scm_putc (';', port);
}
break;
}
}
- scm_putc_unlocked ('|', port);
+ scm_putc ('|', port);
}
/* FIXME: allow R6RS hex escapes instead of #{...}# or |...|. */
@@ -602,7 +602,7 @@ print_vector_or_weak_vector (SCM v, size_t len, SCM (*ref)
(SCM, size_t),
for (i = 0; i < last; ++i)
{
scm_iprin1 (ref (v, i), port, pstate);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
}
if (i == last)
{
@@ -611,7 +611,7 @@ print_vector_or_weak_vector (SCM v, size_t len, SCM (*ref)
(SCM, size_t),
}
if (cutp)
scm_puts_unlocked (" ...", port);
- scm_putc_unlocked (')', port);
+ scm_putc (')', port);
}
static void
@@ -744,9 +744,9 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
{
scm_puts_unlocked ("#<uninterned-symbol ", port);
print_symbol (exp, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_uintprint (SCM_UNPACK (exp), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
break;
case scm_tc7_variable:
@@ -1404,7 +1404,7 @@ scm_ipruk (char *hdr, SCM ptr, SCM port)
}
scm_puts_unlocked (" 0x", port);
scm_uintprint (SCM_UNPACK (ptr), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
@@ -1445,7 +1445,7 @@ scm_iprlist (char *hdr, SCM exp, int tlr, SCM port,
scm_print_state *pstate)
if (scm_is_eq (PSTATE_STACK_REF(pstate, i), exp))
goto circref;
PUSH_REF (pstate, exp);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
/* CHECK_INTS; */
scm_iprin1 (SCM_CAR (exp), port, pstate);
}
@@ -1456,7 +1456,7 @@ scm_iprlist (char *hdr, SCM exp, int tlr, SCM port,
scm_print_state *pstate)
}
end:
- scm_putc_unlocked (tlr, port);
+ scm_putc (tlr, port);
pstate->top = floor + 2;
return;
@@ -1485,7 +1485,7 @@ fancy_printing:
}
PUSH_REF(pstate, exp);
++pstate->list_offset;
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
/* CHECK_INTS; */
scm_iprin1 (SCM_CAR (exp), port, pstate);
}
@@ -1665,7 +1665,7 @@ SCM_DEFINE (scm_newline, "newline", 0, 1, 0,
SCM_VALIDATE_OPORT_VALUE (1, port);
- scm_putc_unlocked ('\n', SCM_COERCE_OUTPORT (port));
+ scm_putc ('\n', SCM_COERCE_OUTPORT (port));
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME
diff --git a/libguile/programs.c b/libguile/programs.c
index c03865d..72990d4 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -105,22 +105,22 @@ scm_i_program_print (SCM program, SCM port,
scm_print_state *pstate)
/* twingliness */
scm_puts_unlocked ("#<continuation ", port);
scm_uintprint (SCM_UNPACK (program), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
else if (SCM_PROGRAM_IS_PARTIAL_CONTINUATION (program))
{
/* twingliness */
scm_puts_unlocked ("#<partial-continuation ", port);
scm_uintprint (SCM_UNPACK (program), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
else if (scm_is_false (write_program) || print_error)
{
scm_puts_unlocked ("#<program ", port);
scm_uintprint (SCM_UNPACK (program), 16, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_uintprint ((scm_t_uintptr) SCM_PROGRAM_CODE (program), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
else
{
diff --git a/libguile/promises.c b/libguile/promises.c
index dcd0ac3..2435d80 100644
--- a/libguile/promises.c
+++ b/libguile/promises.c
@@ -92,7 +92,7 @@ promise_print (SCM exp, SCM port, scm_print_state *pstate)
SCM_SET_WRITINGP (pstate, 1);
scm_iprin1 (SCM_PROMISE_DATA (exp), port, pstate);
SCM_SET_WRITINGP (pstate, writingp);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return !0;
}
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index bad344f..8a7fddd 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -558,7 +558,7 @@ SCM_DEFINE (scm_put_u8, "put-u8", 2, 0, 0,
SCM_VALIDATE_BINARY_OUTPUT_PORT (1, port);
c_octet = scm_to_uint8 (octet);
- scm_putc_unlocked ((char) c_octet, port);
+ scm_putc ((char) c_octet, port);
return SCM_UNSPECIFIED;
}
diff --git a/libguile/smob.c b/libguile/smob.c
index eecefd3..7bcd044 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -107,12 +107,12 @@ scm_smob_print (SCM exp, SCM port, scm_print_state
*pstate SCM_UNUSED)
long n = SCM_SMOBNUM (exp);
scm_puts_unlocked ("#<", port);
scm_puts_unlocked (SCM_SMOBNAME (n) ? SCM_SMOBNAME (n) : "smob", port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
if (scm_smobs[n].size)
scm_uintprint (SCM_CELL_WORD_1 (exp), 16, port);
else
scm_uintprint (SCM_UNPACK (exp), 16, port);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/srcprop.c b/libguile/srcprop.c
index dbebf77..1f6e59a 100644
--- a/libguile/srcprop.c
+++ b/libguile/srcprop.c
@@ -108,7 +108,7 @@ srcprops_print (SCM obj, SCM port, scm_print_state *pstate)
SCM_SET_WRITINGP (pstate, 1);
scm_iprin1 (scm_srcprops_to_alist (obj), port, pstate);
SCM_SET_WRITINGP (pstate, writingp);
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
return 1;
}
diff --git a/libguile/struct.c b/libguile/struct.c
index 3bf2e36..4c9d8da 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -940,7 +940,7 @@ scm_print_struct (SCM exp, SCM port, scm_print_state
*pstate)
if (scm_is_true (name))
{
scm_display (name, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
}
else
{
@@ -949,9 +949,9 @@ scm_print_struct (SCM exp, SCM port, scm_print_state
*pstate)
else
scm_puts_unlocked ("struct:", port);
scm_uintprint (SCM_UNPACK (vtable), 16, port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
scm_write (SCM_VTABLE_LAYOUT (vtable), port);
- scm_putc_unlocked (' ', port);
+ scm_putc (' ', port);
}
scm_uintprint (SCM_UNPACK (exp), 16, port);
/* hackety hack */
@@ -971,7 +971,7 @@ scm_print_struct (SCM exp, SCM port, scm_print_state
*pstate)
scm_write (SCM_STRUCT_SETTER (exp), port);
}
}
- scm_putc_unlocked ('>', port);
+ scm_putc ('>', port);
}
}
diff --git a/libguile/variable.c b/libguile/variable.c
index 7b3f335..41f9c4d 100644
--- a/libguile/variable.c
+++ b/libguile/variable.c
@@ -40,7 +40,7 @@ scm_i_variable_print (SCM exp, SCM port, scm_print_state
*pstate)
scm_uintprint (SCM_UNPACK (exp), 16, port);
scm_puts_unlocked (" value: ", port);
scm_iprin1 (SCM_VARIABLE_REF (exp), port, pstate);
- scm_putc_unlocked('>', port);
+ scm_putc ('>', port);
}
diff --git a/libguile/weak-set.c b/libguile/weak-set.c
index e8523ba..6e42cdd 100644
--- a/libguile/weak-set.c
+++ b/libguile/weak-set.c
@@ -678,7 +678,7 @@ scm_i_weak_set_print (SCM exp, SCM port, scm_print_state
*pstate)
scm_puts_unlocked ("#<", port);
scm_puts_unlocked ("weak-set ", port);
scm_uintprint (SCM_WEAK_SET (exp)->n_items, 10, port);
- scm_putc_unlocked ('/', port);
+ scm_putc ('/', port);
scm_uintprint (SCM_WEAK_SET (exp)->size, 10, port);
scm_puts_unlocked (">", port);
}
diff --git a/libguile/weak-table.c b/libguile/weak-table.c
index 4e3ed33..082d796 100644
--- a/libguile/weak-table.c
+++ b/libguile/weak-table.c
@@ -793,7 +793,7 @@ scm_i_weak_table_print (SCM exp, SCM port, scm_print_state
*pstate)
scm_puts_unlocked ("#<", port);
scm_puts_unlocked ("weak-table ", port);
scm_uintprint (SCM_WEAK_TABLE (exp)->n_items, 10, port);
- scm_putc_unlocked ('/', port);
+ scm_putc ('/', port);
scm_uintprint (SCM_WEAK_TABLE (exp)->size, 10, port);
scm_puts_unlocked (">", port);
}
- [Guile-commits] 04/15: Remove port rw_active field, (continued)
- [Guile-commits] 04/15: Remove port rw_active field, Andy Wingo, 2016/04/26
- [Guile-commits] 08/15: Remove scm_unget_{byte,bytes}_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 06/15: Remove scm_c_read_bytes_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 10/15: Remove locking in scm_end_input, Andy Wingo, 2016/04/26
- [Guile-commits] 05/15: Remove scm_flush_unlocked / scm_end_input_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 11/15: Remove scm_fill_input_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 09/15: scm_ungetc, scm_ungets instead of _unlocked variants, Andy Wingo, 2016/04/26
- [Guile-commits] 07/15: Replace scm_getc with scm_getc_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 14/15: Remove scm_c_write_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 15/15: scm_lfwrite, not scm_lfwrite_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 12/15: Remove scm_putc_unlocked.,
Andy Wingo <=
- [Guile-commits] 13/15: Remove scm_puts_unlocked., Andy Wingo, 2016/04/26