Support the new smokegenerator (r1015073).
src/class-map.lisp
Thu Aug 27 13:43:13 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Support the new smokegenerator (r1015073).
* support const correctness
* remove workarounds for the old smoke
The old smoke is no longer supported.
Thanks to Arno Rehn for making the smokegenerator work with cl-smoke.
--- old-smoke/src/class-map.lisp 2014-10-30 08:11:22.000000000 +0100
+++ new-smoke/src/class-map.lisp 2014-10-30 08:11:22.000000000 +0100
@@ -26,11 +26,13 @@
(setf (gethash (id smoke-class) (id-class-map (smoke smoke-class)))
class))
-(defun find-smoke-class (class)
+(defun find-smoke-class (class &optional (error-p t))
"Returns the CLOS class for smoke-class CLASS."
- (let* ((class (real-class class))
- (ret (gethash (id class) (id-class-map (smoke class)))))
- (assert (not (null ret))
- ()
- "The class ~A was not found." (name class))
+ (let* ((class (handler-case (real-class class)
+ (undefined-class (e) (when error-p (error e)))))
+ (ret (when class (gethash (id class) (id-class-map (smoke class))))))
+ (when error-p
+ (assert (not (null ret))
+ ()
+ "The class ~A was not found." (name class)))
ret))