migrate as-segment to jdk22 API

This commit is contained in:
Kristin Rutenkolk 2024-06-27 16:26:22 +02:00
parent b68f8af549
commit 854d6ce850

View file

@ -271,10 +271,10 @@
(defn as-segment (defn as-segment
"Dereferences an `address` into a memory segment associated with the `session`." "Dereferences an `address` into a memory segment associated with the `session`."
(^MemorySegment [^MemoryAddress address size] (^MemorySegment [^MemorySegment address size]
(MemorySegment/ofAddress address (long size) (connected-session))) (.reinterpret (MemorySegment/ofAddress address) (long size) (connected-session) nil))
(^MemorySegment [^MemoryAddress address size session] (^MemorySegment [^MemorySegment address size session]
(MemorySegment/ofAddress address (long size) session))) (.reinterpret (MemorySegment/ofAddress address) (long size) session nil)))
(defn copy-segment (defn copy-segment
"Copies the content to `dest` from `src`. "Copies the content to `dest` from `src`.