From 96f3153c5f8a9cade712b57d640903f813c93ec1 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 4 Oct 2021 19:20:55 -0500 Subject: [PATCH] Fix bug where compound types were not permitted as return values in defcfn --- CHANGELOG.md | 1 + src/clj/coffi/ffi.clj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 581ea51..d57c584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. This change - An `address?` predicate ### Fixed +- Compound types were not allowed as return types in `defcfn` - `nil` was not considered a null pointer - Primitive-serializing types fail to compile as arguments to downcall handles - Primitive-serializing types fail to load as arguments to upcall functions diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 75c6b6a..24ba6db 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -504,7 +504,7 @@ (s/or :string string? :symbol simple-symbol?)) :native-arglist (s/coll-of ::mem/type :kind vector?) - :return-type qualified-keyword? + :return-type ::mem/type :wrapper (s/? (s/cat :native-fn simple-symbol?