summaryrefslogtreecommitdiff
path: root/libguile/eq.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-04-01 00:18:44 +0200
committerAndy Wingo <wingo@pobox.com>2010-04-01 00:25:06 +0200
commita587d6a97338a0fd62173e60581ff07f55ec2042 (patch)
treee11f29648cbd5efcfeeec2d698f1e7065a894401 /libguile/eq.c
parent92d33877d9f8523eaebab75373a30f161e6cc1e8 (diff)
downloadguile-a587d6a97338a0fd62173e60581ff07f55ec2042.tar.gz
more fixes to equal? for arrays
* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as something that operates on the generic array handle infrastructure. Based on array->list. (scm_i_array_equal_p): Change the docs, as array-equal? is now the same as equal?, except that it typechecks its args. * doc/ref/api-compound.texi (Array Procedures): Update array-equal? docs. * libguile/deprecated.h: * libguile/deprecated.c (scm_raequal): Deprecate. * libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are bytevector=? only if their element type is the same. * libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if both args are arrays (generically). * test-suite/tests/arrays.test ("equal?"): Add some more tests.
Diffstat (limited to 'libguile/eq.c')
-rw-r--r--libguile/eq.c2
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;