Allow non-native byte orders on primitives
This commit is contained in:
parent
104db6b8fd
commit
7c62207613
1 changed files with 24 additions and 12 deletions
|
|
@ -604,32 +604,44 @@
|
|||
byte-layout)
|
||||
|
||||
(defmethod c-layout ::short
|
||||
[_type]
|
||||
short-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder short-layout (second type))
|
||||
short-layout))
|
||||
|
||||
(defmethod c-layout ::int
|
||||
[_type]
|
||||
int-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder int-layout (second type))
|
||||
int-layout))
|
||||
|
||||
(defmethod c-layout ::long
|
||||
[_type]
|
||||
long-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder long-layout (second type))
|
||||
long-layout))
|
||||
|
||||
(defmethod c-layout ::long-long
|
||||
[_type]
|
||||
long-long-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder long-long-layout (second type))
|
||||
long-long-layout))
|
||||
|
||||
(defmethod c-layout ::char
|
||||
[_type]
|
||||
char-layout)
|
||||
|
||||
(defmethod c-layout ::float
|
||||
[_type]
|
||||
float-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder float-layout (second type))
|
||||
float-layout))
|
||||
|
||||
(defmethod c-layout ::double
|
||||
[_type]
|
||||
double-layout)
|
||||
[type]
|
||||
(if (sequential? type)
|
||||
(.withOrder double-layout (second type))
|
||||
double-layout))
|
||||
|
||||
(defmethod c-layout ::pointer
|
||||
[_type]
|
||||
|
|
|
|||
Loading…
Reference in a new issue