Fix class-map image loading and use the new static smoke methods.
src/objects/class.lisp
Sun Jan 17 22:04:08 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix class-map image loading and use the new static smoke methods.
indClass() and isDerivedFrom() are now static (r1076132 and also in KDE 4.4).
--- old-smoke/src/objects/class.lisp 2014-10-30 08:08:42.000000000 +0100
+++ new-smoke/src/objects/class.lisp 2014-10-30 08:08:42.000000000 +0100
@@ -61,13 +61,10 @@
(/= 0 (get-class-flag class :virtual-destructor)))
(define-condition undefined-class (cell-error)
- ((smoke-name :initarg :smoke-name
- :initform nil
- :documentation "The name of the Smoke module"))
+ ()
(:report (lambda (condition stream)
- (format stream "No Smoke class named ~S in the Smoke module ~S."
- (cell-error-name condition)
- (slot-value condition 'smoke-name))))
+ (format stream "No Smoke class named ~S."
+ (cell-error-name condition))))
(:documentation "A undefined Smoke class"))
(define-condition lisp-module-not-loaded (error)
@@ -76,15 +73,15 @@
(format stream "The Lisp smoke module of the class ~A is not loaded."
(slot-value condition 'class-name)))))
-(defun make-smoke-class (smoke name)
- "Returns the class named NAME of the smoke module SMOKE.
+(defun make-smoke-class (name)
+ "Returns the class named NAME.
Signals an undefined-class condition when there is no class for NAME."
(with-foreign-object (c 'smoke-module-index)
(do () (nil)
- (smoke-find-class c (smoke-module-pointer smoke) name)
+ (smoke-find-class c name)
(restart-case
(if (null-pointer-p (foreign-slot-value c 'smoke-module-index 'smoke))
- (error (make-condition 'undefined-class :name name :smoke-name (smoke-get-module-name (smoke-module-pointer smoke))))
+ (error (make-condition 'undefined-class :name name))
(return))
(supply (new-name)
:report "Supply a new class name"
@@ -104,7 +101,7 @@
(defun real-class (class)
"Returns the same class like CLASS, but such that EXTERNAL-P returns NIL."
(if (external-p class)
- (handler-case (make-smoke-class (smoke class) (name class))
+ (handler-case (make-smoke-class (name class))
(undefined-class () class))
class))