[elephant-devel] map-btree from-end arg not working?

Chris Laux chris at terraminds.com
Sat Sep 8 15:55:47 UTC 2007


Hi again,

I seem to have stumbled across another bug: the from-end argument
doesn't seem to be working, map-btree always calls with the same
(presumably last) entry when it is set.

(defun test-btree-from-end (btree from-end)
  (let (acc
	(n 0))
    (map-btree #'(lambda (k v)
		   (push (list k v) acc)
		   (when (= (incf n) 4)
		     (return-from test-btree-from-end acc)))
	       btree :from-end from-end)))

> (test-btree-from-end ** nil)
((3398012969 #<MESSAGE oid:227324>) (3398012898 #<MESSAGE oid:226751>)
 (3398012815 #<MESSAGE oid:226044>) (3398012772 #<MESSAGE oid:225621>))

> (test-btree-from-end *** t)
((3398231130 #<MESSAGE oid:552110>) (3398231130 #<MESSAGE oid:552110>)
 (3398231130 #<MESSAGE oid:552110>) (3398231130 #<MESSAGE oid:552110>))

My setup is BerkeleyDB 4.5.20 with Elephant 0.9.0 with SBCL 1.0.4 on
Linux/x86-64.

Thanks,

Chris Laux







More information about the elephant-devel mailing list