cString => cSourceString; tyCString => tyCstring so that error msgs show cstring, not cString (#17744)

This commit is contained in:
Timothee Cour 2021-04-17 02:14:09 -07:00 • committed by GitHub
commit 7e94420847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 79 additions and 79 deletions

View file

@ -167,7 +167,7 @@ when false:
of tyPointer: k = "range"
of tyOpenArray: k = "openarray"
of tyString: k = "string"
of tyCString: k = "cstring"
of tyCstring: k = "cstring"
of tyInt: k = "int"
of tyInt32: k = "int32"
else: k = "other"

View file

@ -40,7 +40,7 @@ type
tyPointer,
tyOpenArray,
tyString,
tyCString,
tyCstring,
tyForward,
tyInt,
tyInt8,

View file

@ -281,7 +281,7 @@ when not defined(useNimRtl):
of tyString:
let sp = cast[ptr string](p)
reprStrAux(result, sp[].cstring, sp[].len)
of tyCString:
of tyCstring:
let cs = cast[ptr cstring](p)[]
if cs.isNil: add result, "nil"
else: reprStrAux(result, cs, cs.len)

View file

@ -200,7 +200,7 @@ proc reprAux(result: var string, p: pointer, typ: PNimType,
var fp: int
{. emit: "`fp` = `p`;\n" .}
add(result, reprStr(cast[string](p)))
of tyCString:
of tyCstring:
var fp: cstring
{. emit: "`fp` = `p`;\n" .}
if fp.isNil: