summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorJan Smydke <jan.smydke@gmail.com>2018-05-19 12:48:01 +0200
committerAndy Wingo <wingo@pobox.com>2018-08-07 12:09:25 +0200
commit4853ca3e6da6a7acdc2f122151e65dea9bf08b26 (patch)
treea236797984ebc6352f70f485ae6d9a9cac737c1a /libguile
parent4611ba2fcf46f7e959010e1c9d96459e73fa8f39 (diff)
downloadguile-4853ca3e6da6a7acdc2f122151e65dea9bf08b26.tar.gz
get-bytevector-n and get-bytevector-n! can now read more than 4 GB
* libguile/r6rs-ports.c (scm_get_bytevector_n, scm_get_bytevector_n_x): Turn 'c_count' and related variables into a 'size_t', and use 'scm_to_size_t' instead of 'scm_to_uint'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'libguile')
-rw-r--r--libguile/r6rs-ports.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index b923cf2a1..567730530 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -414,11 +414,11 @@ SCM_DEFINE (scm_get_bytevector_n, "get-bytevector-n", 2, 0, 0,
#define FUNC_NAME s_scm_get_bytevector_n
{
SCM result;
- unsigned c_count;
+ size_t c_count;
size_t c_read;
SCM_VALIDATE_BINARY_INPUT_PORT (1, port);
- c_count = scm_to_uint (count);
+ c_count = scm_to_size_t (count);
result = scm_c_make_bytevector (c_count);
@@ -450,13 +450,13 @@ SCM_DEFINE (scm_get_bytevector_n_x, "get-bytevector-n!", 4, 0, 0,
#define FUNC_NAME s_scm_get_bytevector_n_x
{
SCM result;
- unsigned c_start, c_count, c_len;
+ size_t c_start, c_count, c_len;
size_t c_read;
SCM_VALIDATE_BINARY_INPUT_PORT (1, port);
SCM_VALIDATE_BYTEVECTOR (2, bv);
- c_start = scm_to_uint (start);
- c_count = scm_to_uint (count);
+ c_start = scm_to_size_t (start);
+ c_count = scm_to_size_t (count);
c_len = SCM_BYTEVECTOR_LENGTH (bv);