Fix bad usage of static fields as calls

This commit is contained in:
Joshua Suskalo 2024-10-02 16:16:09 -04:00
parent 5c644d054f
commit fd8d649f63
No known key found for this signature in database
GPG key ID: 9B6BA586EFF1B9F0
3 changed files with 6 additions and 4 deletions

View file

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
## [UNRELEASED] ## [UNRELEASED]
### Fixed
- Usage of deprecated `(Class/STATIC_FIELD)` access pattern
## [1.0.450] - 2024-10-02 ## [1.0.450] - 2024-10-02
### Added ### Added

View file

@ -292,7 +292,7 @@
;; cast null pointers to something understood by panama ;; cast null pointers to something understood by panama
(#{::mem/pointer} type) (#{::mem/pointer} type)
`(or ~sym (MemorySegment/NULL)) `(or ~sym MemorySegment/NULL)
(mem/primitive-type type) (mem/primitive-type type)
`(mem/serialize* ~sym ~type-sym ~arena) `(mem/serialize* ~sym ~type-sym ~arena)

View file

@ -115,7 +115,7 @@
(defn null? (defn null?
"Checks if a memory address is null." "Checks if a memory address is null."
[addr] [addr]
(or (.equals (MemorySegment/NULL) addr) (not addr))) (or (.equals MemorySegment/NULL addr) (not addr)))
(defn address? (defn address?
"Checks if an object is a memory address. "Checks if an object is a memory address.
@ -872,7 +872,7 @@
(serialize-into obj (second type) segment arena) (serialize-into obj (second type) segment arena)
(address-of segment)) (address-of segment))
obj) obj)
(MemorySegment/NULL))) MemorySegment/NULL))
(defmethod serialize* ::void (defmethod serialize* ::void
[_obj _type _arena] [_obj _type _arena]
@ -1132,7 +1132,7 @@
[obj _type ^Arena arena] [obj _type ^Arena arena]
(if obj (if obj
(.allocateFrom arena ^String obj) (.allocateFrom arena ^String obj)
(MemorySegment/NULL))) MemorySegment/NULL))
(defmethod deserialize* ::c-string (defmethod deserialize* ::c-string
[addr _type] [addr _type]