From 5886f3203d0421fdeb1df18d6b2310355e81c06b Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 16 Sep 2021 09:40:32 -0500 Subject: [PATCH] Ensure that ::c-string has layouts specified --- src/coffi/ffi.clj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/coffi/ffi.clj b/src/coffi/ffi.clj index 6dac369..6e5275a 100644 --- a/src/coffi/ffi.clj +++ b/src/coffi/ffi.clj @@ -166,6 +166,10 @@ [type] (c-prim-layout type)) +(defmethod c-layout ::c-string + [_type] + CLinker/C_POINTER) + (defmulti primitive-type "Gets the primitive type that is used to pass as an argument for the `type`. @@ -205,6 +209,10 @@ [type] (java-prim-layout type MemorySegment)) +(defmethod java-layout ::c-string + [_type] + MemoryAddress) + (defn size-of "The size in bytes of the given `type`." [type]