mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
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.
This commit is contained in:
parent
cbc2445eb1
commit
04aa6d1fb7
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue