diff options
author | Andy Wingo <wingo@pobox.com> | 2010-03-30 21:23:06 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-03-30 21:23:06 +0200 |
commit | 9d031d4d575ac8f343a5d984cb02cd374577c5a9 (patch) | |
tree | 6fc1ae70b97a131700967705bf70cd17f7e95df2 /libguile/eq.c | |
parent | 6128f34c4b6ae713c4dddc38093aafe7260ccab6 (diff) | |
download | guile-9d031d4d575ac8f343a5d984cb02cd374577c5a9.tar.gz |
fix equal? between an array and a non-array
* libguile/eq.c (scm_equal_p): Only call scm_array_equal_p if both
arguments are generalized arrays; otherwise they are not equal. Thanks
to Daniel Llorens del Río for the tip.
* test-suite/Makefile.am:
* test-suite/tests/arrays.test: Add a test.
Diffstat (limited to 'libguile/eq.c')
-rw-r--r-- | libguile/eq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/eq.c b/libguile/eq.c index 6a533da4e..923fa77a1 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -321,7 +321,7 @@ scm_equal_p (SCM x, SCM y) /* Vectors can be equal to one-dimensional arrays. */ - if (SCM_I_ARRAYP (x) || SCM_I_ARRAYP (y)) + if (scm_is_array (x) && scm_is_array (y)) return scm_array_equal_p (x, y); return SCM_BOOL_F; |