Fix reflection warnings in allocateNative
This commit is contained in:
parent
181db81dd6
commit
e626cbf40b
1 changed files with 2 additions and 2 deletions
|
|
@ -170,12 +170,12 @@
|
||||||
(defn alloc
|
(defn alloc
|
||||||
"Allocates `size` bytes."
|
"Allocates `size` bytes."
|
||||||
([size] (alloc size (ResourceScope/newImplicitScope)))
|
([size] (alloc size (ResourceScope/newImplicitScope)))
|
||||||
([size scope] (MemorySegment/allocateNative size scope)))
|
([size scope] (MemorySegment/allocateNative ^long size ^ResourceScope scope)))
|
||||||
|
|
||||||
(defn alloc-instance
|
(defn alloc-instance
|
||||||
"Allocates a memory segment for the given `type`."
|
"Allocates a memory segment for the given `type`."
|
||||||
([type] (alloc-instance type (ResourceScope/newImplicitScope)))
|
([type] (alloc-instance type (ResourceScope/newImplicitScope)))
|
||||||
([type scope] (MemorySegment/allocateNative (size-of type) scope)))
|
([type scope] (MemorySegment/allocateNative ^long (size-of type) ^ResourceScope scope)))
|
||||||
|
|
||||||
(defn serialize
|
(defn serialize
|
||||||
"Serializes the `obj` into a newly-allocated [[MemorySegment]]."
|
"Serializes the `obj` into a newly-allocated [[MemorySegment]]."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue