mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 10:24:44 +00:00
fixes repr regression
This commit is contained in:
@@ -277,7 +277,9 @@ when not defined(useNimRtl):
|
||||
of tyEnum: add result, reprEnum(getInt(p, typ.size), typ)
|
||||
of tyBool: add result, reprBool(cast[ptr bool](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:
|
||||
let cs = cast[ptr cstring](p)[]
|
||||
if cs.isNil: add result, "nil"
|
||||
|
||||
Reference in New Issue
Block a user