diff --git a/CHANGELOG.md b/CHANGELOG.md index 638d9b5..80a7da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). ## [Unreleased] +### Fixed +- Usage of `defcfn` without a docstring produced an invalid `def` form ## [0.1.169] - 2021-09-28 ### Added diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 1d9c544..4c966e6 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -579,7 +579,8 @@ (mapv (comp symbol name) (:native-arglist args))))))) (:attr-map args))) - ~@(list (:doc args)) + ~@(when-let [doc (:doc args)] + (list doc)) fun#)))) (s/fdef defcfn :args ::defcfn-args)