Add layout constants for c-style primitive layouts

This commit is contained in:
Joshua Suskalo 2022-01-18 13:26:35 -06:00
parent faca63b50c
commit 55d770cc34

View file

@ -224,6 +224,24 @@
See [[big-endian]], [[little-endian]]." See [[big-endian]], [[little-endian]]."
(ByteOrder/nativeOrder)) (ByteOrder/nativeOrder))
(def byte-layout CLinker/C_CHAR)
(def short-layout CLinker/C_SHORT)
(def int-layout CLinker/C_INT)
(def long-layout CLinker/C_LONG)
(def long-long-layout CLinker/C_LONG_LONG)
(def char-layout CLinker/C_CHAR)
(def float-layout CLinker/C_FLOAT)
(def double-layout CLinker/C_DOUBLE)
(def pointer-layout CLinker/C_POINTER)
(defn- type-dispatch (defn- type-dispatch
"Gets a type dispatch value from a (potentially composite) type." "Gets a type dispatch value from a (potentially composite) type."
[type] [type]