diff options
-rw-r--r-- | libguile/ports.c | 20 | ||||
-rw-r--r-- | libguile/ports.h | 1 | ||||
-rw-r--r-- | libguile/r6rs-ports.c | 2 | ||||
-rw-r--r-- | libguile/read.c | 2 |
4 files changed, 4 insertions, 21 deletions
diff --git a/libguile/ports.c b/libguile/ports.c index 2062f588b..58fe0f7f2 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1516,7 +1516,7 @@ scm_c_read_bytes (SCM port, SCM dst, size_t start, size_t count) buffer directly. */ if (to_read < pt->read_buffering) { - read_buf = scm_fill_input_unlocked (port); + read_buf = scm_fill_input (port); did_read = scm_port_buffer_take (read_buf, dst_ptr, to_read); dst_ptr += did_read; to_read -= did_read; @@ -2310,20 +2310,6 @@ SCM_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0, } #undef FUNC_NAME -SCM -scm_fill_input (SCM port) -{ - scm_i_pthread_mutex_t *lock; - SCM ret; - - scm_c_lock_port (port, &lock); - ret = scm_fill_input_unlocked (port); - if (lock) - scm_i_pthread_mutex_unlock (lock); - - return ret; -} - /* Move up to READ_LEN bytes from PORT's read buffer into memory starting at DEST. Return the number of bytes moved. PORT's line/column numbers are left unchanged. */ @@ -2378,11 +2364,9 @@ SCM_DEFINE (scm_drain_input, "drain-input", 1, 0, 0, void scm_end_input (SCM port) { - scm_t_port *pt; SCM buf; size_t discarded; - pt = SCM_PTAB_ENTRY (port); buf = SCM_PTAB_ENTRY (port)->read_buf; discarded = scm_port_buffer_take (buf, NULL, (size_t) -1); @@ -2423,7 +2407,7 @@ scm_flush (SCM port) } SCM -scm_fill_input_unlocked (SCM port) +scm_fill_input (SCM port) { scm_t_port *pt = SCM_PTAB_ENTRY (port); SCM read_buf = pt->read_buf; diff --git a/libguile/ports.h b/libguile/ports.h index 82b2553fe..4ea2c30ff 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -314,7 +314,6 @@ SCM_API SCM scm_unread_string (SCM str, SCM port); /* Manipulating the buffers. */ SCM_API SCM scm_setvbuf (SCM port, SCM mode, SCM size); SCM_API SCM scm_fill_input (SCM port); -SCM_API SCM scm_fill_input_unlocked (SCM port); SCM_INTERNAL size_t scm_take_from_input_buffers (SCM port, char *dest, size_t read_len); SCM_API SCM scm_drain_input (SCM port); SCM_API void scm_end_input (SCM port); diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c index db95e0805..bad344f88 100644 --- a/libguile/r6rs-ports.c +++ b/libguile/r6rs-ports.c @@ -474,7 +474,7 @@ SCM_DEFINE (scm_get_bytevector_some, "get-bytevector-some", 1, 0, 0, SCM_VALIDATE_BINARY_INPUT_PORT (1, port); - buf = scm_fill_input_unlocked (port); + buf = scm_fill_input (port); size = scm_port_buffer_can_take (buf); if (size == 0) { diff --git a/libguile/read.c b/libguile/read.c index bcbf37ee4..ca9694f89 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -2073,7 +2073,7 @@ scm_i_scan_for_encoding (SCM port) if (scm_port_buffer_can_take (buf) == 0) { /* We can use the read buffer, and thus avoid a seek. */ - buf = scm_fill_input_unlocked (port); + buf = scm_fill_input (port); bytes_read = scm_port_buffer_can_take (buf); if (bytes_read > SCM_ENCODING_SEARCH_SIZE) bytes_read = SCM_ENCODING_SEARCH_SIZE; |