Add docstrings to layout defs

This commit is contained in:
Joshua Suskalo 2022-01-18 13:38:48 -06:00
parent e8b3c8e2b2
commit 2cfa0ed623

View file

@ -227,23 +227,41 @@
See [[big-endian]], [[little-endian]]."
(ByteOrder/nativeOrder))
(def byte-layout CLinker/C_CHAR)
(def byte-layout
"The [[MemoryLayout]] for a byte in [[native-endian]] [[ByteOrder]]."
CLinker/C_CHAR)
(def short-layout CLinker/C_SHORT)
(def short-layout
"The [[MemoryLayout]] for a c-sized short in [[native-endian]] [[ByteOrder]]."
CLinker/C_SHORT)
(def int-layout CLinker/C_INT)
(def int-layout
"The [[MemoryLayout]] for a c-sized int in [[native-endian]] [[ByteOrder]]."
CLinker/C_INT)
(def long-layout CLinker/C_LONG)
(def long-layout
"The [[MemoryLayout]] for a c-sized long in [[native-endian]] [[ByteOrder]]."
CLinker/C_LONG)
(def long-long-layout CLinker/C_LONG_LONG)
(def long-long-layout
"The [[MemoryLayout]] for a c-sized long-long in [[native-endian]] [[ByteOrder]]."
CLinker/C_LONG_LONG)
(def char-layout CLinker/C_CHAR)
(def char-layout
"The [[MemoryLayout]] for a c-sized char in [[native-endian]] [[ByteOrder]]."
CLinker/C_CHAR)
(def float-layout CLinker/C_FLOAT)
(def float-layout
"The [[MemoryLayout]] for a c-sized float in [[native-endian]] [[ByteOrder]]."
CLinker/C_FLOAT)
(def double-layout CLinker/C_DOUBLE)
(def double-layout
"The [[MemoryLayout]] for a c-sized double in [[native-endian]] [[ByteOrder]]."
CLinker/C_DOUBLE)
(def pointer-layout CLinker/C_POINTER)
(def pointer-layout
"The [[MemoryLayout]] for a native pointer in [[native-endian]] [[ByteOrder]]."
CLinker/C_POINTER)
(defn- type-dispatch
"Gets a type dispatch value from a (potentially composite) type."