From 620a94200d9d7a33e41afd77c275599feb259ebd Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 17 Feb 2008 11:20:27 +0100 Subject: Implement FOREIGN-CLASS-ENSURE-REGISTERED. darcs-hash:cc3448394e3e337be716275c3e4016a542860fd1 --- Lisp/libobjcl.lisp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Lisp/libobjcl.lisp') diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index 727bfc5..2308b60 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -309,8 +309,12 @@ conventional case for namespace identifiers in Objective-C." (if (objc-pointer-null class-ptr) nil (let ((class-name (objc-class-name->symbol class-name-string)) - (superclass (or (objcl-class-superclass/pointer class-ptr) - (find-class 'id)))) + (superclass (let ((potential-superclass + (objcl-class-superclass/pointer class-ptr))) + (if potential-superclass + (foreign-class-ensure-registered + potential-superclass) + (find-class 'id))))) (or (find-class class-name nil) (c2mop:ensure-class class-name :metaclass (class-name @@ -365,7 +369,9 @@ conventional case for namespace identifiers in Objective-C." (superclass (if non-meta-superclass (find-objc-meta-class (%objcl-class-name - (pointer-to non-meta-superclass))) + (pointer-to + (foreign-class-ensure-registered + non-meta-superclass)))) (find-class 'objective-c-class))) ;; If there is no superclass, we are the root metaclass. ;; As we cannot assign ourselves as our own metaclass -- cgit v1.2.3