summaryrefslogtreecommitdiff
path: root/libguile/bytevectors.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-08-16 23:05:34 -0400
committerMark H Weaver <mhw@netris.org>2013-08-16 23:05:34 -0400
commit88cff2ef1bd0d11987f034d2e7dec10c89f5719d (patch)
treeff0050987bd4fe30b3ac088e02a5ae583c0d3ccc /libguile/bytevectors.c
parent521c542199afa4f199746d5bbffc18a988cb30bc (diff)
parent088cfb7d761b01a2620d78f10e8dbcaa07485a32 (diff)
downloadguile-88cff2ef1bd0d11987f034d2e7dec10c89f5719d.tar.gz
Merge remote-tracking branch 'origin/stable-2.0'
Diffstat (limited to 'libguile/bytevectors.c')
-rw-r--r--libguile/bytevectors.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index 9093f49c3..56c00cb6e 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -1116,20 +1116,18 @@ SCM_DEFINE (scm_bytevector_sint_set_x, "bytevector-sint-set!", 5, 0, 0,
\
SCM_VALIDATE_BYTEVECTOR (1, bv); \
SCM_VALIDATE_SYMBOL (2, endianness); \
- c_size = scm_to_uint (size); \
+ c_size = scm_to_unsigned_integer (size, 1, (size_t) -1); \
\
c_len = SCM_BYTEVECTOR_LENGTH (bv); \
- if (SCM_UNLIKELY (c_len == 0)) \
+ if (SCM_UNLIKELY (c_len < c_size)) \
lst = SCM_EOL; \
- else if (SCM_UNLIKELY (c_len < c_size)) \
- scm_out_of_range (FUNC_NAME, size); \
else \
{ \
const char *c_bv; \
\
c_bv = (char *) SCM_BYTEVECTOR_CONTENTS (bv); \
\
- lst = scm_make_list (scm_from_uint (c_len / c_size), \
+ lst = scm_make_list (scm_from_size_t (c_len / c_size), \
SCM_UNSPECIFIED); \
for (i = 0, pair = lst; \
i <= c_len - c_size; \