diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-17 11:20:27 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-17 11:20:27 +0100 |
commit | 620a94200d9d7a33e41afd77c275599feb259ebd (patch) | |
tree | 5b681e73025c590ae5a88697c02e31e58d26e15b /Lisp/libobjcl.lisp | |
parent | b824aed3edf4f51b6a0fb13370c3abc75bc85206 (diff) |
Implement FOREIGN-CLASS-ENSURE-REGISTERED.
darcs-hash:cc3448394e3e337be716275c3e4016a542860fd1
Diffstat (limited to 'Lisp/libobjcl.lisp')
-rw-r--r-- | Lisp/libobjcl.lisp | 12 |
1 files changed, 9 insertions, 3 deletions
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 |