1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 08:40:19 +02:00

* goops.scm (equal?): Provide default method for `equal?'.

(compute-getters-n-setters): Check for bad init-thunks.

* eq.c (scm_eqv_p, scm_equal_p): Turned into a primitive generics.

* goops.texi (Object Comparisons): Removed object-eqv? and
object-equal? and added eqv?, equal? and =.
This commit is contained in:
Mikael Djurfeldt 2003-04-17 18:47:18 +00:00
parent 071d6b0ecc
commit e672dd0208
6 changed files with 37 additions and 15 deletions

View file

@ -1,6 +1,6 @@
2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* eq.c (scm_equal_p): Turned into a primitive generic.
* eq.c (scm_eqv_p, scm_equal_p): Turned into a primitive generics.
* snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
macros.

View file

@ -67,7 +67,7 @@ SCM_DEFINE1 (scm_eq_p, "eq?", scm_tc7_rpsubr,
#undef FUNC_NAME
SCM_DEFINE1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
SCM_PRIMITIVE_GENERIC_1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
(SCM x, SCM y),
"The @code{eqv?} procedure defines a useful equivalence relation on objects.\n"
"Briefly, it returns @code{#t} if @var{x} and @var{y} should normally be\n"
@ -110,7 +110,10 @@ SCM_DEFINE1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
&& SCM_COMPLEX_IMAG (x) == SCM_COMPLEX_IMAG (y));
}
}
return SCM_BOOL_F;
if (SCM_UNPACK (g_scm_eqv_p))
return scm_call_generic_2 (g_scm_eqv_p, x, y);
else
return SCM_BOOL_F;
}
#undef FUNC_NAME