summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2003-04-17 19:23:52 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2003-04-17 19:23:52 +0000
commit47cd67db2f52975b32ae1857b88af293797035b5 (patch)
treefafecbce15cd78227796f5afdceebef0c6792f1d /libguile
parent266f3a23d7d905b044bf9b69ec2f7aaf41abf0d0 (diff)
downloadguile-47cd67db2f52975b32ae1857b88af293797035b5.tar.gz
* 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.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/ChangeLog4
-rw-r--r--libguile/eq.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 5095ff433..839e5aa42 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -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.
diff --git a/libguile/eq.c b/libguile/eq.c
index 5b144beef..67abdc96e 100644
--- a/libguile/eq.c
+++ b/libguile/eq.c
@@ -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