Update type hinting for alloc-instance based on size-of

This commit is contained in:
Joshua Suskalo 2022-01-18 13:28:43 -06:00
parent b960c01bb3
commit b029a41f6a

View file

@ -397,8 +397,8 @@
(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 (connected-scope))) (^MemorySegment [type] (alloc-instance type (connected-scope)))
([type scope] (MemorySegment/allocateNative (long (size-of type)) ^ResourceScope scope))) (^MemorySegment [type scope] (MemorySegment/allocateNative ^long (size-of type) ^ResourceScope scope)))
(declare serialize serialize-into) (declare serialize serialize-into)