From ba8c67e8d4c822fcfd3e516cf442fcb639b40bec Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Fri, 17 Sep 2021 10:48:24 -0500 Subject: [PATCH] Allow getting the address of more than just memory segments --- src/coffi/ffi.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coffi/ffi.clj b/src/coffi/ffi.clj index 2a9bac1..61fea3e 100644 --- a/src/coffi/ffi.clj +++ b/src/coffi/ffi.clj @@ -10,6 +10,7 @@ MethodHandle MethodType) (jdk.incubator.foreign + Addressable CLinker FunctionDescriptor GroupLayout @@ -83,8 +84,8 @@ "Gets the address of a given segment. This value can be used as an argument to functions which take a pointer." - [segment] - (.address ^MemorySegment segment)) + [addressable] + (.address ^Addressable addressable)) (defn slice-global "Gets a slice of the global address space.