Ensure that there's no reflection on deserializing a string
This commit is contained in:
parent
bf611f3106
commit
4a6cf4075e
1 changed files with 4 additions and 7 deletions
|
|
@ -380,18 +380,15 @@
|
|||
(deserialize* type)))
|
||||
|
||||
(defmethod deserialize* ::c-string
|
||||
[obj _type]
|
||||
(CLinker/toJavaString obj))
|
||||
|
||||
(defn serialize
|
||||
[])
|
||||
[addr _type]
|
||||
(CLinker/toJavaString ^MemoryAddress addr))
|
||||
|
||||
(defn deserialize
|
||||
"Deserializes an arbitrary type regardless of if it is primitive.
|
||||
"Deserializes an arbitrary type.
|
||||
|
||||
For types which have a primitive representation, this deserializes the
|
||||
primitive representation. For types which do not, this deserializes out of
|
||||
a [[MemorySegment]]."
|
||||
a segment."
|
||||
[obj type]
|
||||
((if (primitive-type type)
|
||||
deserialize*
|
||||
|
|
|
|||
Loading…
Reference in a new issue