Update docstring to reflect address-of returning a long

This commit is contained in:
Joshua Suskalo 2024-10-03 14:11:57 -04:00
parent d183fcdf98
commit 6ff882b85d
No known key found for this signature in database
GPG key ID: 9B6BA586EFF1B9F0
2 changed files with 2 additions and 3 deletions

View file

@ -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 - 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 ### 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 - Usage of deprecated `(Class/STATIC_FIELD)` access pattern
## [1.0.450] - 2024-10-02 ## [1.0.450] - 2024-10-02

View file

@ -106,9 +106,7 @@
(.allocate ^SegmentAllocator allocator (long size) (long alignment)))) (.allocate ^SegmentAllocator allocator (long size) (long alignment))))
(defn address-of (defn address-of
"Gets the address of a given segment. "Gets the address of a given segment as a number."
This value can be used as an argument to functions which take a pointer."
^long [addressable] ^long [addressable]
(.address ^MemorySegment addressable)) (.address ^MemorySegment addressable))