From a3f15eb67cb6e84e1800412b9adb0dfcab924fa1 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 29 May 2006 21:40:06 +0000 Subject: [PATCH] (scm_equal_p): Use scm_array_equal_p explicitely when one of the arguments is a array. This allows vectors to be equal to one-dimensional arrays. --- libguile/eq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libguile/eq.c b/libguile/eq.c index 4513b6b32..71d1acfa1 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -257,6 +257,11 @@ SCM_PRIMITIVE_GENERIC_1 (scm_equal_p, "equal?", scm_tc7_rpsubr, && SCM_COMPLEX_IMAG (x) == 0.0); } + /* Vectors can be equal to one-dimensional arrays. + */ + if (SCM_I_ARRAYP (x) || SCM_I_ARRAYP (y)) + return scm_array_equal_p (x, y); + return SCM_BOOL_F; } switch (SCM_TYP7 (x))