assert that binding exists
Wed Apr 8 17:18:07 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* assert that binding exists
diff -rN -u old-smoke/src/bindings.lisp new-smoke/src/bindings.lisp
--- old-smoke/src/bindings.lisp 2014-10-01 12:22:14.000000000 +0200
+++ new-smoke/src/bindings.lisp 2014-10-01 12:22:15.000000000 +0200
@@ -9,7 +9,12 @@
(defun binding (smoke)
"Returns the Smoke binding for the Smoke module SMOKE."
(with-lock-held (*bindings-lock*)
- (gethash (pointer-address smoke) *bindings*)))
+ (multiple-value-bind (value present-p)
+ (gethash (pointer-address smoke) *bindings*)
+ (assert (eql t present-p)
+ ()
+ "No binding for ~A." smoke)
+ value)))
(defun (setf binding) (binding smoke)
(with-lock-held (*bindings-lock*)