summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-08-04 02:55:57 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-08-04 02:55:57 +0200
commit4189fe61c27a961e7e7e60b165b9645a827cd076 (patch)
treedb739ad104aa7beb686fb1e87e5cede80f452d24
parent1f4b75e92f6399ec545140ef3d6afe7644f1e6eb (diff)
Make method calls with a void return type not fail.
darcs-hash:2eb33be14a84eb7907d888c6c11597bb3aeed8d1
-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))