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:
parent
5f010460d6
commit
a3f15eb67c
1 changed files with 5 additions and 0 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue