[elephant-cvs] CVS update: elephant/src/collections.lisp
blee at common-lisp.net
blee at common-lisp.net
Sun Aug 29 20:36:49 UTC 2004
Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv7729/src
Modified Files:
collections.lisp
Log Message:
new license, should return values on setf
Date: Sun Aug 29 22:36:49 2004
Author: blee
Index: elephant/src/collections.lisp
diff -u elephant/src/collections.lisp:1.5 elephant/src/collections.lisp:1.6
--- elephant/src/collections.lisp:1.5 Sun Aug 29 09:48:04 2004
+++ elephant/src/collections.lisp Sun Aug 29 22:36:48 2004
@@ -12,6 +12,10 @@
;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee
;;; <ablumberg at common-lisp.net> <blee at common-lisp.net>
;;;
+;;; This program is released under the following license
+;;; ("GPL"). For differenct licensing terms, contact the
+;;; copyright holders.
+;;;
;;; This program is free software; you can redistribute it
;;; and/or modify it under the terms of the GNU General
;;; Public License as published by the Free Software
@@ -53,12 +57,14 @@
(defmethod get-value (key (ht btree))
(declare (optimize (speed 3) (safety 0) (space 3)))
(buffer-write-int (oid ht) *key-buf*)
- (let ((key-length (serialize key *key-buf*)))
+ (let* ((key-length (serialize key *key-buf*))
+ (buf (db-get-key-buffered
+ (controller-db *store-controller*)
+ (buffer-stream-buffer *key-buf*)
+ key-length)))
(declare (type fixnum key-length))
- (deserialize (db-get-key-buffered
- (controller-db *store-controller*)
- (buffer-stream-buffer *key-buf*)
- key-length))))
+ (if buf (values (deserialize buf) T)
+ (values nil nil))))
(defmethod (setf get-value) (value key (ht btree))
(declare (optimize (speed 3) (safety 0)))
@@ -69,7 +75,8 @@
(buffer-stream-buffer *key-buf*) key-length
(buffer-stream-buffer *out-buf*) val-length
:transaction *current-transaction*
- :auto-commit *auto-commit*)))
+ :auto-commit *auto-commit*)
+ value))
(defmethod remove-kv (key (ht btree)
&key (transaction *current-transaction*)
More information about the Elephant-cvs
mailing list