Fix bug where deserializing nullpointers as functions failed instead of returning nil
This commit is contained in:
parent
50cc6f3bdc
commit
ea53cfbdc2
2 changed files with 9 additions and 7 deletions
|
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This change
|
|||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Deserializing nullpointers as functions threw an exception
|
||||
- Upcall stubs with non-primitive arguments failed to compile
|
||||
- Upcall stubs had incorrect types
|
||||
|
||||
|
|
|
|||
|
|
@ -367,13 +367,14 @@
|
|||
|
||||
(defmethod mem/deserialize* ::fn
|
||||
[addr [_fn arg-types ret-type & {:keys [raw-fn?]}]]
|
||||
(when-not (mem/null? addr)
|
||||
(-> addr
|
||||
(downcall-handle
|
||||
(method-type arg-types ret-type)
|
||||
(function-descriptor arg-types ret-type))
|
||||
(downcall-fn arg-types ret-type)
|
||||
(cond->
|
||||
(not raw-fn?) (make-serde-wrapper arg-types ret-type))))
|
||||
(not raw-fn?) (make-serde-wrapper arg-types ret-type)))))
|
||||
|
||||
;;; Static memory access
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue