summaryrefslogtreecommitdiff
path: root/Lisp/type-conversion.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp/type-conversion.lisp')
-rw-r--r--Lisp/type-conversion.lisp14
1 files changed, 11 insertions, 3 deletions
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.