Fix a bug where non-primitive argument types failed to link
This commit is contained in:
parent
0db99f9106
commit
ab82b6a5a1
2 changed files with 7 additions and 4 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Fixed
|
||||||
|
- Non-primitive argument types fail to link
|
||||||
|
|
||||||
## [0.1.205] - 2021-10-06
|
## [0.1.205] - 2021-10-06
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
CLinker
|
CLinker
|
||||||
FunctionDescriptor
|
FunctionDescriptor
|
||||||
MemoryLayout
|
MemoryLayout
|
||||||
|
MemorySegment
|
||||||
SegmentAllocator)))
|
SegmentAllocator)))
|
||||||
|
|
||||||
;;; FFI Code loading and function access
|
;;; FFI Code loading and function access
|
||||||
|
|
@ -108,10 +109,10 @@
|
||||||
(defn- insn-layout
|
(defn- insn-layout
|
||||||
"Gets the type keyword or class for referring to the type in bytecode."
|
"Gets the type keyword or class for referring to the type in bytecode."
|
||||||
[type]
|
[type]
|
||||||
(when-some [prim (mem/primitive-type type)]
|
(or (when-some [prim (mem/primitive-type type)]
|
||||||
(if (not= prim ::mem/pointer)
|
(when (not= prim ::mem/pointer)
|
||||||
(keyword (name prim))
|
(keyword (name prim))))
|
||||||
(mem/java-layout type))))
|
(mem/java-layout type)))
|
||||||
|
|
||||||
(def ^:private unbox-fn-for-type
|
(def ^:private unbox-fn-for-type
|
||||||
"Map from type name to the name of its unboxing function."
|
"Map from type name to the name of its unboxing function."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue