Ensure that ::c-string has layouts specified

This commit is contained in:
Joshua Suskalo 2021-09-16 09:40:32 -05:00
parent 1d09275ba4
commit 5886f3203d

View file

@ -166,6 +166,10 @@
[type] [type]
(c-prim-layout type)) (c-prim-layout type))
(defmethod c-layout ::c-string
[_type]
CLinker/C_POINTER)
(defmulti primitive-type (defmulti primitive-type
"Gets the primitive type that is used to pass as an argument for the `type`. "Gets the primitive type that is used to pass as an argument for the `type`.
@ -205,6 +209,10 @@
[type] [type]
(java-prim-layout type MemorySegment)) (java-prim-layout type MemorySegment))
(defmethod java-layout ::c-string
[_type]
MemoryAddress)
(defn size-of (defn size-of
"The size in bytes of the given `type`." "The size in bytes of the given `type`."
[type] [type]