mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 21:10:29 +02:00
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>
This commit is contained in:
parent
efc33cd149
commit
26b446d52b
1 changed files with 5 additions and 5 deletions
|
@ -408,11 +408,11 @@ SCM_DEFINE (scm_get_bytevector_n, "get-bytevector-n", 2, 0, 0,
|
||||||
#define FUNC_NAME s_scm_get_bytevector_n
|
#define FUNC_NAME s_scm_get_bytevector_n
|
||||||
{
|
{
|
||||||
SCM result;
|
SCM result;
|
||||||
unsigned c_count;
|
size_t c_count;
|
||||||
size_t c_read;
|
size_t c_read;
|
||||||
|
|
||||||
SCM_VALIDATE_BINARY_INPUT_PORT (1, port);
|
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);
|
result = scm_c_make_bytevector (c_count);
|
||||||
|
|
||||||
|
@ -444,13 +444,13 @@ SCM_DEFINE (scm_get_bytevector_n_x, "get-bytevector-n!", 4, 0, 0,
|
||||||
#define FUNC_NAME s_scm_get_bytevector_n_x
|
#define FUNC_NAME s_scm_get_bytevector_n_x
|
||||||
{
|
{
|
||||||
SCM result;
|
SCM result;
|
||||||
unsigned c_start, c_count, c_len;
|
size_t c_start, c_count, c_len;
|
||||||
size_t c_read;
|
size_t c_read;
|
||||||
|
|
||||||
SCM_VALIDATE_BINARY_INPUT_PORT (1, port);
|
SCM_VALIDATE_BINARY_INPUT_PORT (1, port);
|
||||||
SCM_VALIDATE_BYTEVECTOR (2, bv);
|
SCM_VALIDATE_BYTEVECTOR (2, bv);
|
||||||
c_start = scm_to_uint (start);
|
c_start = scm_to_size_t (start);
|
||||||
c_count = scm_to_uint (count);
|
c_count = scm_to_size_t (count);
|
||||||
|
|
||||||
c_len = SCM_BYTEVECTOR_LENGTH (bv);
|
c_len = SCM_BYTEVECTOR_LENGTH (bv);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue