summaryrefslogtreecommitdiff
path: root/libguile/arrays.c
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2013-05-08 16:06:40 +0200
committerAndy Wingo <wingo@pobox.com>2014-02-10 21:58:28 +0100
commit2c1ccb02c565aa364149e84547628f0eac460981 (patch)
treebba0c19ef6149744eab44fa2a40c9f5e0d1e8889 /libguile/arrays.c
parentc6eaad9757e55bd9ee32464f35e86958cf7c8272 (diff)
downloadguile-2c1ccb02c565aa364149e84547628f0eac460981.tar.gz
array-contents returns root for empty arrays with empty root
This fixes a compiler issue where (uniform-array->bytevector #2f64()) failed because of the stricter definition of uniform-vector? on this branch. Perhaps it would be better if uniform-array->bytevector didn't require a contiguous argument. * libguile/arrays.c: (scm_array_contents): return the root regardless of the value of SCM_I_ARRAY_DIMS (ra)->inc. * test-suite/tests/arrays.test: check.
Diffstat (limited to 'libguile/arrays.c')
-rw-r--r--libguile/arrays.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libguile/arrays.c b/libguile/arrays.c
index 2a6678d5b..702faacbe 100644
--- a/libguile/arrays.c
+++ b/libguile/arrays.c
@@ -589,9 +589,8 @@ SCM_DEFINE (scm_array_contents, "array-contents", 1, 1, 0,
}
v = SCM_I_ARRAY_V (ra);
- if ((len == scm_c_array_length (v)) && (0 == SCM_I_ARRAY_BASE (ra))
- && SCM_I_ARRAY_DIMS (ra)->inc)
- return v;
+ if ((len == scm_c_array_length (v)) && (0 == SCM_I_ARRAY_BASE (ra)))
+ return v;
else
{
SCM sra = scm_i_make_array (1);