Line | Exclusive | Inclusive | Code |
---|---|---|---|
1 | # This file is a part of Julia. License is MIT: https://julialang.org/license | ||
2 | |||
3 | 3 (7.14%) |
3 (100.00%)
samples spent calling
print
print(xs...) = print(stdout::IO, xs...)
|
|
4 | println(xs...) = println(stdout::IO, xs...) | ||
5 | println(io::IO) = print(io, '\n') | ||
6 | |||
7 | struct DevNull <: IO end | ||
8 | const devnull = DevNull() | ||
9 | isreadable(::DevNull) = false | ||
10 | iswritable(::DevNull) = true | ||
11 | isopen(::DevNull) = true | ||
12 | read(::DevNull, ::Type{UInt8}) = throw(EOFError()) | ||
13 | write(::DevNull, ::UInt8) = 1 | ||
14 | unsafe_write(::DevNull, ::Ptr{UInt8}, n::UInt)::Int = n | ||
15 | close(::DevNull) = nothing | ||
16 | flush(::DevNull) = nothing | ||
17 | wait_connected(::DevNull) = nothing | ||
18 | wait_readnb(::DevNull) = wait() | ||
19 | wait_readbyte(::DevNull) = wait() | ||
20 | wait_close(::DevNull) = wait() | ||
21 | eof(::DevNull) = true | ||
22 | |||
23 | let CoreIO = Union{Core.CoreSTDOUT, Core.CoreSTDERR} | ||
24 | global write, unsafe_write | ||
25 | write(io::CoreIO, x::UInt8) = Core.write(io, x) | ||
26 | unsafe_write(io::CoreIO, x::Ptr{UInt8}, nb::UInt) = Core.unsafe_write(io, x, nb) | ||
27 | end | ||
28 | |||
29 | stdin = devnull | ||
30 | stdout = Core.stdout | ||
31 | stderr = Core.stderr |