From 275c6ec6abbd96781f455a32854ee64bd684fe06 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Fri, 8 Oct 2021 19:26:46 -0500 Subject: [PATCH] Make arrays deserialize to vectors --- CHANGELOG.md | 1 + src/clj/coffi/mem.clj | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edaf2e5..31705d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] ### Fixed +- Arrays deserialized to non-vector sequences - Non-primitive argument types fail to link ## [0.1.205] - 2021-10-06 diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index a237442..7378384 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -643,9 +643,9 @@ (defmethod deserialize-from ::array [segment [_array type count]] - (map #(deserialize-from % type) - (slice-segments (slice segment 0 (* count (size-of type))) - (size-of type)))) + (mapv #(deserialize-from % type) + (slice-segments (slice segment 0 (* count (size-of type))) + (size-of type)))) (s/def ::type (s/spec