sbcl garbage collector fails to collect garbage, so we disabled weak pointer tests.

Pascal J. Bourguignon [2013-06-16 13:21]
sbcl garbage collector fails to collect garbage, so we disabled weak pointer tests.
Filename
clext/closer-weak.lisp
diff --git a/clext/closer-weak.lisp b/clext/closer-weak.lisp
index 60a8294..cca9560 100644
--- a/clext/closer-weak.lisp
+++ b/clext/closer-weak.lisp
@@ -151,7 +151,7 @@ your option) any later version.

 (defun gc ()
   "Calls the garbage collector."
-  nil
+  #-(or ccl clisp cmu sbcl) (error "~S: Missing a garbage collector call for ~S" 'gc (lisp-implementationt-type))
   #+ccl   (ccl:gc)
   #+clisp (ext:gc)
   #+cmu   (extensions:gc)
@@ -303,11 +303,10 @@ The returned list must not be destructively modified."
 ;;; Unfortunately, it looks like this is a primitive operation that
 ;;; cannot be implemented with just weak pointers.  CMUCL & SBCL are weak.

-#+(or cmu sbcl)
-(eval-when (:compile-toplevel :load-toplevel :execute)
-  (format *error-output*
-    "~2%WARNING: ~A: WEAK-OR-RELATION should be implemented ~
-     as primitive in ~A~2%" 'closer-weak (lisp-implementation-type)))
+;; #+(or cmu sbcl)
+;; (eval-when (:compile-toplevel :load-toplevel :execute)
+;;   (warn "~A: ~A is lacking a primitive WEAK-OR-RELATION."
+;;         'closer-weak (lisp-implementation-type)))

 #-(and clisp (not debug-weak))
 (defstruct (weak-or-relation (:constructor %make-weak-or-relation)
@@ -1215,6 +1214,8 @@ It has no effect when some key has already been garbage-collected.")
   (test/wl)
   (test/wht))

-(test)
+#-sbcl (test)
+;; #+sbcl (warn "~A: ~A fails weak-pointer garbage collection tests. Testing is disabled."
+;;         'closer-weak (lisp-implementation-type))

 ;;;; THE END ;;;;
ViewGit