guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 29/58: get-bytevector-n and get-bytevector-n! can now re


From: Andy Wingo
Subject: [Guile-commits] 29/58: get-bytevector-n and get-bytevector-n! can now read more than 4 GB
Date: Tue, 7 Aug 2018 06:58:35 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 4853ca3e6da6a7acdc2f122151e65dea9bf08b26
Author: Jan Smydke <address@hidden>
Date:   Sat May 19 12:48:01 2018 +0200

    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 <address@hidden>
---
 libguile/r6rs-ports.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index b923cf2..5677305 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);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]