change String handling to match new FFI API
This commit is contained in:
parent
c43bce4768
commit
a04fe7253f
1 changed files with 3 additions and 3 deletions
|
|
@ -1247,15 +1247,15 @@
|
||||||
::pointer)
|
::pointer)
|
||||||
|
|
||||||
(defmethod serialize* ::c-string
|
(defmethod serialize* ::c-string
|
||||||
[obj _type session]
|
[obj _type ^Arena session]
|
||||||
(if obj
|
(if obj
|
||||||
(address-of (.allocateUtf8String (arena-allocator session) ^String obj))
|
(address-of (.allocateFrom session ^String obj))
|
||||||
(MemorySegment/NULL)))
|
(MemorySegment/NULL)))
|
||||||
|
|
||||||
(defmethod deserialize* ::c-string
|
(defmethod deserialize* ::c-string
|
||||||
[addr _type]
|
[addr _type]
|
||||||
(when-not (null? addr)
|
(when-not (null? addr)
|
||||||
(.getUtf8String (.reinterpret ^MemorySegment addr Integer/MAX_VALUE) 0)))
|
(.getString (.reinterpret ^MemorySegment addr Integer/MAX_VALUE) 0)))
|
||||||
|
|
||||||
;;; Union types
|
;;; Union types
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue