summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--objcl.lisp8
1 files changed, 5 insertions, 3 deletions
diff --git a/objcl.lisp b/objcl.lisp
index 7027bd1..e5b695d 100644
--- a/objcl.lisp
+++ b/objcl.lisp
@@ -368,9 +368,11 @@
(with-foreign-slots ((type data) obj-data obj-data)
(let* ((type-name (type-id->type-name (foreign-string-to-lisp type)))
(lisp-type (type-name->lisp-type type-name))
- (value (foreign-slot-value data
- 'obj-data-union
- (type-name->slot-name type-name))))
+ (value (if (eq 'void type-name)
+ (values)
+ (foreign-slot-value data
+ 'obj-data-union
+ (type-name->slot-name type-name)))))
(case lisp-type
((objc-id objc-class objc-selector objc-exception)
(make-instance lisp-type :pointer value))