From 75bbe119717271f97b30f1d223b5dbadd60e0ed8 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 31 Oct 2022 11:39:56 -0500 Subject: [PATCH] Add todo about potential bug with nil as a primitive argument --- src/clj/coffi/ffi.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 41b76eb..f673dea 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -247,6 +247,9 @@ [downcall arg-types ret-type] (let [;; Complexity of types const-args? (or (vector? arg-types) (nil? arg-types)) + ;; FIXME(Joshua): there's a potential bug where `nil` as a pointer + ;; argument is not converted to [[MemoryAddress/NULL]] if it's + ;; considered primitive. simple-args? (when const-args? (every? mem/primitive? arg-types)) const-ret? (s/valid? ::mem/type ret-type)