* Fix previous change (thanks to Matthias Koeppe).
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 24 Nov 2000 14:43:41 +0000 (14:43 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 24 Nov 2000 14:43:41 +0000 (14:43 +0000)
libguile/ChangeLog
libguile/goops.c
libguile/goops.h

index 72a18d9..9d6d192 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-24  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>
+
+        * goops.c (filter_cpl, remove_duplicate_slots), goops.h
+       (SCM_SUBCLASSP):  Fix previous change:  In contrast to
+       scm_sloppy_memq the function scm_memq returns #f if the
+       object was not contained in the list.
+
 2000-11-24  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * goops.c:  Include validate.h.
index 699627b..154c7d0 100644 (file)
@@ -218,7 +218,7 @@ filter_cpl (SCM ls)
   while (SCM_NIMP (ls))
     {
       SCM el = SCM_CAR (ls);
-      if (SCM_IMP (scm_memq (el, res)))
+      if (SCM_FALSEP (scm_memq (el, res)))
        res = scm_cons (el, res);
       ls = SCM_CDR (ls);
     }
@@ -259,7 +259,7 @@ remove_duplicate_slots (SCM l, SCM res, SCM slots_already_seen)
                    "bad slot name ~S",
                    SCM_LIST1 (tmp));
   
-  if (SCM_NULLP (scm_memq (tmp, slots_already_seen))) {
+  if (SCM_FALSEP (scm_memq (tmp, slots_already_seen))) {
     res               = scm_cons (SCM_CAR (l), res);
     slots_already_seen = scm_cons (tmp, slots_already_seen);
   }
index f139922..db4659b 100644 (file)
@@ -134,7 +134,7 @@ typedef struct scm_method_t {
                                   | SCM_CLASSF_SIMPLE_METHOD))
 
 #define SCM_SLOT(x, i)         (SCM_INST(x)[i])
-#define SCM_SUBCLASSP(c1, c2)  SCM_NNULLP (scm_memq (c2, SCM_SLOT (c1, scm_si_cpl)))
+#define SCM_SUBCLASSP(c1, c2)  (!SCM_FALSEP (scm_memq (c2, SCM_SLOT (c1, scm_si_cpl))))
 #define SCM_IS_A_P(x, c)       (SCM_NIMP (x) \
                                && SCM_INSTANCEP (x) \
                                && SCM_SUBCLASSP (SCM_CLASS_OF (x), c))