fixes #3080
This commit is contained in:
parent
ea35cede8e
commit
f9750781c0
1 changed files with 4 additions and 1 deletions
|
|
@ -256,7 +256,10 @@ when not defined(useNimRtl):
|
||||||
of tyBool: add result, reprBool(cast[ptr bool](p)[])
|
of tyBool: add result, reprBool(cast[ptr bool](p)[])
|
||||||
of tyChar: add result, reprChar(cast[ptr char](p)[])
|
of tyChar: add result, reprChar(cast[ptr char](p)[])
|
||||||
of tyString: reprStrAux(result, cast[ptr string](p)[])
|
of tyString: reprStrAux(result, cast[ptr string](p)[])
|
||||||
of tyCString: reprStrAux(result, $(cast[ptr cstring](p)[]))
|
of tyCString:
|
||||||
|
let cs = cast[ptr cstring](p)[]
|
||||||
|
if cs.isNil: add result, "nil"
|
||||||
|
else: reprStrAux(result, $cs)
|
||||||
of tyRange: reprAux(result, p, typ.base, cl)
|
of tyRange: reprAux(result, p, typ.base, cl)
|
||||||
of tyProc, tyPointer:
|
of tyProc, tyPointer:
|
||||||
if cast[PPointer](p)[] == nil: add result, "nil"
|
if cast[PPointer](p)[] == nil: add result, "nil"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue