[gsharp-cvs] CVS gsharp/Flexichain

tmoore tmoore at common-lisp.net
Mon Mar 6 20:46:48 UTC 2006


Update of /project/gsharp/cvsroot/gsharp/Flexichain
In directory clnet:/tmp/cvs-serv3429

Modified Files:
	flexirank.lisp utilities.lisp 
Log Message:
Weak pointers for Allegro Common Lisp. Yes, I know this isn't the preferred repository for Flexichains anymore

--- /project/gsharp/cvsroot/gsharp/Flexichain/flexirank.lisp	2005/11/28 21:27:02	1.4
+++ /project/gsharp/cvsroot/gsharp/Flexichain/flexirank.lisp	2006/03/06 20:46:48	1.5
@@ -75,5 +75,5 @@
 (defmethod insert-vector* :after ((chain flexirank-mixin) position vector)
   (loop for elem across vector
 	for pos from position
-	do (setf (index elem) (position-index pos)
+	do (setf (index elem) (position-index chain pos)
 		 (chain elem) chain)))
--- /project/gsharp/cvsroot/gsharp/Flexichain/utilities.lisp	2005/01/15 08:43:50	1.3
+++ /project/gsharp/cvsroot/gsharp/Flexichain/utilities.lisp	2006/03/06 20:46:48	1.4
@@ -40,8 +40,11 @@
 ;;;
 ;;; TODO: check other CL implementations behavior wrt. return values
 (defclass weak-pointer-container-mixin ()
-  (#+openmcl
-   (weak-hash :initform (make-hash-table :test #'eq :weak :value)))
+  (#+(or openmcl allegro)
+   (weak-hash :initform (make-hash-table :test #'eq
+					 ;; Get it together guys!
+					 #+openmcl :weak #+openmcl :value
+					 #+allegro :values #+allegro :weak)))
   (:documentation "Support for weak references, if needed"))
 
 (defgeneric make-weak-pointer (object container))
@@ -52,7 +55,7 @@
     #+cmu (extensions:make-weak-pointer object)
     #+sbcl (sb-ext:make-weak-pointer object))
 
-#+openmcl
+#+(or openmcl allegro)
 (defmethod make-weak-pointer (object (container weak-pointer-container-mixin))
   (let ((key (cons nil nil)))
     (setf (gethash key (slot-value container 'weak-hash)) object)
@@ -66,15 +69,15 @@
   #+cmu (extensions:weak-pointer-value weak-pointer)
   #+sbcl (sb-ext:weak-pointer-value weak-pointer))
 
-#+openmcl
+#+(or openmcl allegro)
 (defmethod weak-pointer-value
     (weak-pointer (container weak-pointer-container-mixin))
   (gethash weak-pointer (slot-value container 'weak-hash) nil))
 
-#-(or sbcl cmu openmcl)
+#-(or sbcl cmu openmcl allegro)
 (progn
   (eval-when (:evaluate :compile-toplevel :load-toplevel)
-    (warning "No support for weak pointers in this implementation. Things may
+    (warn "No support for weak pointers in this implementation. Things may
 get big and slow")
     )
   (defmethod make-weak-pointer (object container)




More information about the Gsharp-cvs mailing list