DEFINE_SRFI_4_C_FUNCS (S32, s32, scm_t_int32, 1);
DEFINE_SRFI_4_PROXIES (u64);
-#if SCM_HAVE_T_INT64
DEFINE_SRFI_4_C_FUNCS (U64, u64, scm_t_uint64, 1);
-#endif
DEFINE_SRFI_4_PROXIES (s64);
-#if SCM_HAVE_T_INT64
DEFINE_SRFI_4_C_FUNCS (S64, s64, scm_t_int64, 1);
-#endif
DEFINE_SRFI_4_PROXIES (f32);
DEFINE_SRFI_4_C_FUNCS (F32, f32, float, 1);
case SCM_ARRAY_ELEMENT_TYPE_C64:
{
SCM ret = scm_i_make_typed_bytevector (scm_to_size_t (len), i);
- if (SCM_UNBNDP (fill))
+
+ if (SCM_UNBNDP (fill) || scm_is_eq (len, SCM_INUM0))
; /* pass */
else if (scm_is_true (scm_zero_p (fill)))
memset (SCM_BYTEVECTOR_CONTENTS (ret), 0,
scm_t_array_handle h;
size_t len;
ssize_t pos, inc;
+
scm_uniform_vector_writable_elements (ret, &h, &len, &inc);
+
for (pos = 0; pos != h.dims[0].ubnd; pos += inc)
scm_array_handle_set (&h, pos, fill);
+
+ /* Initialize the last element. */
+ scm_array_handle_set (&h, pos, fill);
+
scm_array_handle_release (&h);
}
return ret;