1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00

(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.
This commit is contained in:
Marius Vollmer 2006-05-29 21:40:06 +00:00
parent 5f010460d6
commit a3f15eb67c

View file

@ -257,6 +257,11 @@ SCM_PRIMITIVE_GENERIC_1 (scm_equal_p, "equal?", scm_tc7_rpsubr,
&& SCM_COMPLEX_IMAG (x) == 0.0); && 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; return SCM_BOOL_F;
} }
switch (SCM_TYP7 (x)) switch (SCM_TYP7 (x))