Move java layout to a simple function
This commit is contained in:
parent
30891c35ab
commit
9e7aab273e
1 changed files with 3 additions and 7 deletions
|
|
@ -227,15 +227,11 @@
|
|||
::pointer MemoryAddress
|
||||
::void Void/TYPE})
|
||||
|
||||
(defmulti java-layout
|
||||
(defn java-layout
|
||||
"Gets the Java class to an argument of this type for a method handle.
|
||||
|
||||
If a type serializes to a primitive it should return a Java primitive type.
|
||||
|
||||
Otherwise, it should return [[MemorySegment]]."
|
||||
type-dispatch)
|
||||
|
||||
(defmethod java-layout :default
|
||||
If a type serializes to a primitive it returns return a Java primitive type.
|
||||
Otherwise, it returns [[MemorySegment]]."
|
||||
[type]
|
||||
(java-prim-layout (or (primitive-type type) type) MemorySegment))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue