type hint size and alignment constants

This commit is contained in:
Joshua Suskalo 2022-01-19 11:00:57 -06:00
parent 5ae32161b3
commit 3e63230c1f

View file

@ -264,59 +264,59 @@
"The [[MemoryLayout]] for a native pointer in [[native-endian]] [[ByteOrder]]." "The [[MemoryLayout]] for a native pointer in [[native-endian]] [[ByteOrder]]."
CLinker/C_POINTER) CLinker/C_POINTER)
(def short-size (def ^long short-size
"The size in bytes of a c-sized short." "The size in bytes of a c-sized short."
(.byteSize short-layout)) (.byteSize short-layout))
(def int-size (def ^long int-size
"The size in bytes of a c-sized int." "The size in bytes of a c-sized int."
(.byteSize int-layout)) (.byteSize int-layout))
(def long-size (def ^long long-size
"The size in bytes of a c-sized long." "The size in bytes of a c-sized long."
(.byteSize long-layout)) (.byteSize long-layout))
(def long-long-size (def ^long long-long-size
"The size in bytes of a c-sized long long." "The size in bytes of a c-sized long long."
(.byteSize long-long-layout)) (.byteSize long-long-layout))
(def float-size (def ^long float-size
"The size in bytes of a c-sized float." "The size in bytes of a c-sized float."
(.byteSize float-layout)) (.byteSize float-layout))
(def double-size (def ^long double-size
"The size in bytes of a c-sized double." "The size in bytes of a c-sized double."
(.byteSize double-layout)) (.byteSize double-layout))
(def pointer-size (def ^long pointer-size
"The size in bytes of a c-sized pointer." "The size in bytes of a c-sized pointer."
(.byteSize pointer-layout)) (.byteSize pointer-layout))
(def short-alignment (def ^long short-alignment
"The alignment in bytes of a c-sized short." "The alignment in bytes of a c-sized short."
(.byteAlignment short-layout)) (.byteAlignment short-layout))
(def int-alignment (def ^long int-alignment
"The alignment in bytes of a c-sized int." "The alignment in bytes of a c-sized int."
(.byteAlignment int-layout)) (.byteAlignment int-layout))
(def long-alignment (def ^long long-alignment
"The alignment in bytes of a c-sized long." "The alignment in bytes of a c-sized long."
(.byteAlignment long-layout)) (.byteAlignment long-layout))
(def long-long-alignment (def ^long long-long-alignment
"The alignment in bytes of a c-sized long long." "The alignment in bytes of a c-sized long long."
(.byteAlignment long-long-layout)) (.byteAlignment long-long-layout))
(def float-alignment (def ^long float-alignment
"The alignment in bytes of a c-sized float." "The alignment in bytes of a c-sized float."
(.byteAlignment float-layout)) (.byteAlignment float-layout))
(def double-alignment (def ^long double-alignment
"The alignment in bytes of a c-sized double." "The alignment in bytes of a c-sized double."
(.byteAlignment double-layout)) (.byteAlignment double-layout))
(def pointer-alignment (def ^long pointer-alignment
"The alignment in bytes of a c-sized pointer." "The alignment in bytes of a c-sized pointer."
(.byteAlignment pointer-layout)) (.byteAlignment pointer-layout))