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

* tests/goops.test: Added tests for correctness of class

precedence list in all basic classes and tests for eqv? and
equal?.

* goops.scm (compute-getters-n-setters): Check for bad init-thunk.
(eqv?): Added default method.
(equal?): New default method which uses eqv?.

* eq.c (scm_eqv_p): Turned into a primitive generic.
This commit is contained in:
Mikael Djurfeldt 2003-04-17 19:23:52 +00:00
parent 266f3a23d7
commit 47cd67db2f
6 changed files with 92 additions and 14 deletions

View file

@ -1,3 +1,7 @@
2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* eq.c (scm_eqv_p): Turned into a primitive generic.
2003-04-16 Rob Browning <rlb@defaultvalue.org>
* gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.

View file

@ -61,7 +61,7 @@ real_eqv (double x, double y)
return !memcmp (&x, &y, sizeof(double));
}
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"
@ -108,7 +108,10 @@ SCM_DEFINE1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
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