fixes #20089; remove setPointer since strings/seqs are not pointers with ORC (#20090)

fixes #20089; remove setPointer since strings/seqs are not pointers anymore
This commit is contained in:
ringabout 2022-07-26 22:48:01 +08:00 • committed by GitHub
commit 1c39af3389
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View file

@ -163,7 +163,10 @@ proc loadAny(p: var JsonParser, a: Any, t: var Table[BiggestInt, pointer]) =
of akSequence:
case p.kind
of jsonNull:
setPointer(a, nil)
when defined(nimSeqsV2):
invokeNewSeq(a, 0)
else:
setPointer(a, nil)
next(p)
of jsonArrayStart:
next(p)
@ -230,7 +233,10 @@ proc loadAny(p: var JsonParser, a: Any, t: var Table[BiggestInt, pointer]) =
of akString:
case p.kind
of jsonNull:
setPointer(a, nil)
when defined(nimSeqsV2):
setString(a, "")
else:
setPointer(a, nil)
next(p)
of jsonString:
setString(a, p.str)