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
|
|
@ -360,21 +360,21 @@ proc cppDefine*(define: string) =
|
|||
## needs to be mangled.
|
||||
builtin
|
||||
|
||||
proc stdinReadLine(): TaintedString {.
|
||||
proc stdinReadLine(): string {.
|
||||
tags: [ReadIOEffect], raises: [IOError].} =
|
||||
builtin
|
||||
|
||||
proc stdinReadAll(): TaintedString {.
|
||||
proc stdinReadAll(): string {.
|
||||
tags: [ReadIOEffect], raises: [IOError].} =
|
||||
builtin
|
||||
|
||||
proc readLineFromStdin*(): TaintedString {.raises: [IOError].} =
|
||||
proc readLineFromStdin*(): string {.raises: [IOError].} =
|
||||
## Reads a line of data from stdin - blocks until \n or EOF which happens when stdin is closed
|
||||
log "readLineFromStdin":
|
||||
result = stdinReadLine()
|
||||
checkError(EOFError)
|
||||
|
||||
proc readAllFromStdin*(): TaintedString {.raises: [IOError].} =
|
||||
proc readAllFromStdin*(): string {.raises: [IOError].} =
|
||||
## Reads all data from stdin - blocks until EOF which happens when stdin is closed
|
||||
log "readAllFromStdin":
|
||||
result = stdinReadAll()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue