Consider nil as null?

This commit is contained in:
Joshua Suskalo 2021-10-01 12:03:39 -05:00
parent 8100295567
commit 7d621f82db
2 changed files with 2 additions and 1 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This change
## [Unreleased]
### Fixed
- `nil` was not considered a null pointer
- Primitive-serializing types fail to compile as arguments to downcall handles
- Primitive-serializing types fail to load as arguments to upcall functions
- Void return types on upcalls crash the JVM

View file

@ -128,7 +128,7 @@
(defn null?
"Checks if a memory address is null."
[addr]
(.equals (MemoryAddress/NULL) addr))
(or (.equals (MemoryAddress/NULL) addr) (not addr)))
(defn slice-global
"Gets a slice of the global address space.