From 868c843875e1591bc8cdc112891abe9cda048000 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Wed, 13 Oct 2021 09:57:23 -0500 Subject: [PATCH] Add perdicate for primitive types --- src/clj/coffi/mem.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index 888d0cd..6ed30cd 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -212,6 +212,11 @@ (qualified-keyword? type) type (sequential? type) (keyword (first type)))) +(def primitive? + "A set of all primitive types." + #{::byte ::short ::int ::long ::long-long + ::char ::float ::double ::pointer}) + (defmulti primitive-type "Gets the primitive type that is used to pass as an argument for the `type`.