summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
Diffstat (limited to 'libguile')
-rw-r--r--libguile/eq.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libguile/eq.c b/libguile/eq.c
index 99b3488ad..11dce99a1 100644
--- a/libguile/eq.c
+++ b/libguile/eq.c
@@ -332,6 +332,14 @@ scm_equal_p (SCM x, SCM y)
switch (SCM_TYP7 (x))
{
default:
+ /* Check equality between structs of equal type (see cell-type test above). */
+ if (SCM_STRUCTP (x))
+ {
+ if (SCM_INSTANCEP (x))
+ goto generic_equal;
+ else
+ return scm_i_struct_equalp (x, y);
+ }
break;
case scm_tc7_number:
switch SCM_TYP16 (x)
@@ -349,14 +357,6 @@ scm_equal_p (SCM x, SCM y)
case scm_tc7_wvect:
return scm_i_vector_equal_p (x, y);
}
- /* Check equality between structs of equal type (see cell-type test above). */
- if (SCM_STRUCTP (x))
- {
- if (SCM_INSTANCEP (x))
- goto generic_equal;
- else
- return scm_i_struct_equalp (x, y);
- }
/* Otherwise just return false. Dispatching to the generic is the wrong thing
here, as we can hit this case for any two objects of the same type that we