From 6ff882b85da0f73d6228361c6eaac801bc5effd5 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 3 Oct 2024 14:11:57 -0400 Subject: [PATCH] Update docstring to reflect address-of returning a long --- CHANGELOG.md | 1 + src/clj/coffi/mem.clj | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 251df24..8de7bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. This change - Upcall and downcall classes have been changed to be memoized, meaning ASM is no longer invoked every time a function is serialized, which should drastically improve performance where functions are serialized in a hot loop ### Fixed +- Incorrect docstring on `coffi.mem/address-of` that implied some type of pointer type was returned rather than a long - Usage of deprecated `(Class/STATIC_FIELD)` access pattern ## [1.0.450] - 2024-10-02 diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index 99bd00e..7dde14a 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -106,9 +106,7 @@ (.allocate ^SegmentAllocator allocator (long size) (long alignment)))) (defn address-of - "Gets the address of a given segment. - - This value can be used as an argument to functions which take a pointer." + "Gets the address of a given segment as a number." ^long [addressable] (.address ^MemorySegment addressable))