diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index dd29161..061ff3b 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -347,8 +347,9 @@ `(mem/deserialize-from ~expr ~ret-type-sym)) deserialize-ret (fn [expr] (cond - (or (mem/primitive? ret-type) - (#{::mem/void} ret-type)) + (and (or (mem/primitive? ret-type) + (#{::mem/void} ret-type)) + (not (#{::mem/pointer} (mem/primitive-type ret-type)))) expr (mem/primitive-type ret-type)