summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-08-03 15:09:21 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-08-03 15:09:21 +0200
commit2841f04d147c3f640e5a0b9787f5823a5f53e692 (patch)
tree59ebbe539985609262b7dff99aa7a5654e2fe76c
parent4b6286e29cf106584566c6d77009f3a4b3e3ed39 (diff)
OBJCL-FIND-CLASS: Return NIL if no class is found.
darcs-hash:c0f56365377654d35fddd76e9bf2a49f053b6bb3
-rw-r--r--objcl.lisp9
1 files changed, 7 insertions, 2 deletions
diff --git a/objcl.lisp b/objcl.lisp
index 2f0acc6..c87c6d6 100644
--- a/objcl.lisp
+++ b/objcl.lisp
@@ -241,11 +241,16 @@
(case lisp-type
((objc-id objc-class objc-selector)
(make-instance lisp-type :pointer value))
- (otherwise value)))))
+ (otherwise value)))))
(defun objcl-find-class (class-name)
(let ((obj-data (%objcl-find-class class-name)))
(prog1
- (obj-data->lisp obj-data)
+ (if (null-pointer-p (foreign-slot-value
+ (foreign-slot-value obj-data 'obj-data 'data)
+ 'obj-data-union
+ 'id-val))
+ nil
+ (obj-data->lisp obj-data))
(dealloc-obj-data obj-data))))