[elephant-cvs] CVS update: elephant/src/controller.lisp
blee at common-lisp.net
blee at common-lisp.net
Sat Sep 4 08:16:56 UTC 2004
Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv12648/src
Modified Files:
controller.lisp
Log Message:
fixed macros
Date: Sat Sep 4 10:16:56 2004
Author: blee
Index: elephant/src/controller.lisp
diff -u elephant/src/controller.lisp:1.7 elephant/src/controller.lisp:1.8
--- elephant/src/controller.lisp:1.7 Thu Sep 2 16:42:38 2004
+++ elephant/src/controller.lisp Sat Sep 4 10:16:55 2004
@@ -157,12 +157,13 @@
(setf (controller-environment sc) nil)
nil)
-(defmacro with-open-controller ((&optional (sc *store-controller*))
+(defmacro with-open-controller ((&optional (sc '*store-controller*))
&body body)
`(unwind-protect
(progn
- (open-controller ,sc)
- , at body)
+ (let (*store-controller* (open-controller ,sc))
+ (declare (special *store-controller*))
+ , at body))
(close-controller ,sc)))
(defun open-store (path)
@@ -170,4 +171,16 @@
(open-controller *store-controller*))
(defun close-store ()
- (close-controller *store-controller*))
\ No newline at end of file
+ (close-controller *store-controller*))
+
+(defmacro with-open-store ((path) &body body)
+ (let ((sc (gensym)))
+ `(let ((,sc (make-instance 'store-controller :path ,path)))
+ (unwind-protect
+ (progn
+ (let ((*store-controller* ,sc))
+ (declare (special *store-controller*))
+ (open-controller *store-controller*)
+ , at body))
+ (close-controller ,sc)))))
+
More information about the Elephant-cvs
mailing list