Allow getting the address of more than just memory segments

This commit is contained in:
Joshua Suskalo 2021-09-17 10:48:24 -05:00
parent 75910f0ab3
commit ba8c67e8d4

View file

@ -10,6 +10,7 @@
MethodHandle MethodHandle
MethodType) MethodType)
(jdk.incubator.foreign (jdk.incubator.foreign
Addressable
CLinker CLinker
FunctionDescriptor FunctionDescriptor
GroupLayout GroupLayout
@ -83,8 +84,8 @@
"Gets the address of a given segment. "Gets the address of a given segment.
This value can be used as an argument to functions which take a pointer." This value can be used as an argument to functions which take a pointer."
[segment] [addressable]
(.address ^MemorySegment segment)) (.address ^Addressable addressable))
(defn slice-global (defn slice-global
"Gets a slice of the global address space. "Gets a slice of the global address space.