summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-17 21:54:39 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-17 21:54:39 +0200
commit0ec83cb4b02d2d7f827e4aa5bd9f32a01e5011de (patch)
tree502146d970b308298e06f0d0bc8be7665b8da130
parent66ec63315fc0135ddba1f9551e36dd629b1a27fb (diff)
LOW-LEVEL-INVOKE: Don't break upon invocations with a void return type.
darcs-hash:50cce0d04ea864174e9fdfea4821fe0b79e46452
-rw-r--r--Lisp/method-invocation.lisp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index 87f7e55..4c5abac 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -317,7 +317,10 @@ Returns: *result* --- the return value of the method invocation.
(cffi:with-foreign-objects ((objc-arg-typestrings :string
(- argc 2))
(objc-arg-ptrs :pointer argc)
- (objc-return-value-cell return-c-type)
+ (objc-return-value-cell
+ (if (eq return-c-type :void)
+ :int
+ return-c-type))
(objc-arg-buffer +pessimistic-allocation-type+
argc))
;; Prepare the argument pointer vector.
@@ -367,6 +370,7 @@ Returns: *result* --- the return value of the method invocation.
(make-instance (car return-type)
:pointer (cffi:mem-ref objc-return-value-cell
return-c-type))))
+ ((:void) (values))
(otherwise (cffi:mem-ref objc-return-value-cell
return-c-type)))))))))