summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-20 11:43:27 +0200
committerAndy Wingo <wingo@pobox.com>2018-08-07 12:34:27 +0200
commit04aa6d1fb75ed7f73117a455907b86c5a220276d (patch)
tree8d02b23c3f8e71b68614b2efdb9c26f2fe680743
parentcbc2445eb135c69122599a1e7ce6e86778d48867 (diff)
downloadguile-04aa6d1fb75ed7f73117a455907b86c5a220276d.tar.gz
r6rs-ports: 'put-bytevector' accepts 64-bit integers.
* libguile/r6rs-ports.c (scm_put_bytevector): Use 'size_t' for c_start, c_count, and c_len.
-rw-r--r--libguile/r6rs-ports.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index 0e9084853..2ee0ed939 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -589,7 +589,7 @@ SCM_DEFINE (scm_put_bytevector, "put-bytevector", 2, 2, 0,
"octets.")
#define FUNC_NAME s_scm_put_bytevector
{
- unsigned c_start, c_count, c_len;
+ size_t c_start, c_count, c_len;
SCM_VALIDATE_BINARY_OUTPUT_PORT (1, port);
SCM_VALIDATE_BYTEVECTOR (2, bv);
@@ -598,11 +598,11 @@ SCM_DEFINE (scm_put_bytevector, "put-bytevector", 2, 2, 0,
if (!scm_is_eq (start, SCM_UNDEFINED))
{
- c_start = scm_to_uint (start);
+ c_start = scm_to_size_t (start);
if (!scm_is_eq (count, SCM_UNDEFINED))
{
- c_count = scm_to_uint (count);
+ c_count = scm_to_size_t (count);
if (SCM_UNLIKELY (c_start + c_count > c_len))
scm_out_of_range (FUNC_NAME, count);
}