Deprecate TaintedString (#15423)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
This commit is contained in:
parent
7b632f9ccb
commit
78a99587a4
36 changed files with 184 additions and 229 deletions
|
|
@ -102,7 +102,7 @@ proc getFileDir(filename: string): string =
|
|||
|
||||
proc execCmdEx2(command: string, args: openArray[string]; workingDir, input: string = ""): tuple[
|
||||
cmdLine: string,
|
||||
output: TaintedString,
|
||||
output: string,
|
||||
exitCode: int] {.tags:
|
||||
[ExecIOEffect, ReadIOEffect, RootEffect], gcsafe.} =
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ proc execCmdEx2(command: string, args: openArray[string]; workingDir, input: str
|
|||
close instream
|
||||
|
||||
result.exitCode = -1
|
||||
var line = newStringOfCap(120).TaintedString
|
||||
var line = newStringOfCap(120)
|
||||
while true:
|
||||
if outp.readLine(line):
|
||||
result.output.string.add(line.string)
|
||||
|
|
@ -161,7 +161,7 @@ proc callCompiler(cmdTemplate, filename, options, nimcache: string,
|
|||
var x = newStringOfCap(120)
|
||||
result.nimout = ""
|
||||
while true:
|
||||
if outp.readLine(x.TaintedString):
|
||||
if outp.readLine(x):
|
||||
result.nimout.add(x & "\n")
|
||||
if x =~ pegOfInterest:
|
||||
# `err` should contain the last error/warning message
|
||||
|
|
@ -210,7 +210,7 @@ proc callCCompiler(cmdTemplate, filename, options: string,
|
|||
result.output = ""
|
||||
result.line = -1
|
||||
while true:
|
||||
if outp.readLine(x.TaintedString):
|
||||
if outp.readLine(x):
|
||||
result.nimout.add(x & "\n")
|
||||
elif not running(p):
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue