even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -266,7 +266,7 @@ when not defined(useNimRtl):
|
|||
of tyChar: add result, reprChar(cast[ptr char](p)[])
|
||||
of tyString:
|
||||
let sp = cast[ptr string](p)
|
||||
reprStrAux(result, if sp[].isNil: nil else: sp[].cstring, sp[].len)
|
||||
reprStrAux(result, sp[].cstring, sp[].len)
|
||||
of tyCString:
|
||||
let cs = cast[ptr cstring](p)[]
|
||||
if cs.isNil: add result, "nil"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue