From 0ec83cb4b02d2d7f827e4aa5bd9f32a01e5011de Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Mon, 17 Sep 2007 21:54:39 +0200 Subject: LOW-LEVEL-INVOKE: Don't break upon invocations with a void return type. darcs-hash:50cce0d04ea864174e9fdfea4821fe0b79e46452 --- Lisp/method-invocation.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))))))))) -- cgit v1.2.3