From aa8645cdf28eb7b13d2813f5f0fe014df4d7b4b8 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Mon, 24 Mar 2008 13:28:45 +0100 Subject: When receiving a Lisp value wrapper from Objective-C, unwrap it automatically. darcs-hash:f1b183f46c4d97c27121e0ada8614b9e9feb9955 --- Lisp/type-conversion.lisp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Lisp/type-conversion.lisp') diff --git a/Lisp/type-conversion.lisp b/Lisp/type-conversion.lisp index 9796104..5be0f12 100644 --- a/Lisp/type-conversion.lisp +++ b/Lisp/type-conversion.lisp @@ -25,9 +25,17 @@ (typespec-primary-type typespec)) ((id objective-c-class exception selector) (let ((*skip-retaining* skip-retaining-p)) - (intern-pointer-wrapper (typespec-primary-type typespec) - :pointer (cffi:mem-ref foreign-value-cell - c-type)))) + (let ((instance + (intern-pointer-wrapper (typespec-primary-type typespec) + :pointer (cffi:mem-ref + foreign-value-cell + c-type)))) + (typecase instance + (lisp-value-wrapper-mixin + (if *skip-value-wrapper-unwrapping* + instance + (lisp-value instance))) + (t instance))))) ((:char :unsigned-char) ;; FIXME? This is non-trivial. See policy.lisp for ;; details. -- cgit v1.2.3