fixes repr regression
This commit is contained in:
parent
8d3d9ce5cc
commit
cb6c975d3a
1 changed files with 3 additions and 1 deletions
|
|
@ -277,7 +277,9 @@ when not defined(useNimRtl):
|
||||||
of tyEnum: add result, reprEnum(getInt(p, typ.size), typ)
|
of tyEnum: add result, reprEnum(getInt(p, typ.size), typ)
|
||||||
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)[], cast[ptr string](p)[].len)
|
of tyString:
|
||||||
|
let sp = cast[ptr string](p)
|
||||||
|
reprStrAux(result, if sp[].isNil: nil else: sp[].cstring, sp[].len)
|
||||||
of tyCString:
|
of tyCString:
|
||||||
let cs = cast[ptr cstring](p)[]
|
let cs = cast[ptr cstring](p)[]
|
||||||
if cs.isNil: add result, "nil"
|
if cs.isNil: add result, "nil"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue