From 014901233cc3009a4b0b2851f5ad06417f09afd6 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Wed, 6 Oct 2021 08:53:02 -0500 Subject: [PATCH] Fix bug where compound types in arglist metadata failed --- CHANGELOG.md | 1 + src/clj/coffi/ffi.clj | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d57c584..87a0c43 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 caused problems in arglists meta on expansion of `defcfn` - 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 diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 24ba6db..bfb497f 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -582,7 +582,11 @@ (or old-list (seq arglists) (list - (mapv (comp symbol name) + (mapv (fn [type] + (-> (cond-> type + (vector? type) first) + name + symbol)) (:native-arglist args))))))) (assoc (:attr-map args) ::address address)))