Skip to content

Commit

Permalink
don't always set logger in parse_input_line
Browse files Browse the repository at this point in the history
helps startup time a bit
  • Loading branch information
JeffBezanson committed Jul 29, 2018
1 parent aa70c12 commit 3a42b41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,14 @@ end

function parse_input_line(s::String; filename::String="none", depwarn=true)
# For now, assume all parser warnings are depwarns
ex = with_logger(depwarn ? current_logger() : NullLogger()) do
ex = if depwarn
ccall(:jl_parse_input_line, Any, (Ptr{UInt8}, Csize_t, Ptr{UInt8}, Csize_t),
s, sizeof(s), filename, sizeof(filename))
else
with_logger(NullLogger()) do
ccall(:jl_parse_input_line, Any, (Ptr{UInt8}, Csize_t, Ptr{UInt8}, Csize_t),
s, sizeof(s), filename, sizeof(filename))
end
end
if ex isa Symbol && all(isequal('_'), string(ex))
# remove with 0.7 deprecation
Expand Down

0 comments on commit 3a42b41

Please sign in to comment.