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)
|
byte-layout)
|
||||||
|
|
||||||
(defmethod c-layout ::short
|
(defmethod c-layout ::short
|
||||||
[_type]
|
[type]
|
||||||
short-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder short-layout (second type))
|
||||||
|
short-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::int
|
(defmethod c-layout ::int
|
||||||
[_type]
|
[type]
|
||||||
int-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder int-layout (second type))
|
||||||
|
int-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::long
|
(defmethod c-layout ::long
|
||||||
[_type]
|
[type]
|
||||||
long-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder long-layout (second type))
|
||||||
|
long-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::long-long
|
(defmethod c-layout ::long-long
|
||||||
[_type]
|
[type]
|
||||||
long-long-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder long-long-layout (second type))
|
||||||
|
long-long-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::char
|
(defmethod c-layout ::char
|
||||||
[_type]
|
[_type]
|
||||||
char-layout)
|
char-layout)
|
||||||
|
|
||||||
(defmethod c-layout ::float
|
(defmethod c-layout ::float
|
||||||
[_type]
|
[type]
|
||||||
float-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder float-layout (second type))
|
||||||
|
float-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::double
|
(defmethod c-layout ::double
|
||||||
[_type]
|
[type]
|
||||||
double-layout)
|
(if (sequential? type)
|
||||||
|
(.withOrder double-layout (second type))
|
||||||
|
double-layout))
|
||||||
|
|
||||||
(defmethod c-layout ::pointer
|
(defmethod c-layout ::pointer
|
||||||
[_type]
|
[_type]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue