Skip to content

Commit a025f00

Browse files
authored
Merge pull request #37810 from JuliaLang/jq/37665
Don't interpolate stdout in printf macro to avoid precompilation issues
2 parents 5c51ad2 + 34a8ee6 commit a025f00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/Printf/src/Printf.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,8 @@ julia> @printf "%.0f %.1f %f\\n" 0.5 0.025 -0.0078125
758758
"""
759759
macro printf(io_or_fmt, args...)
760760
if io_or_fmt isa String
761-
io = stdout
762761
fmt = Format(io_or_fmt)
763-
return esc(:($Printf.format($io, $fmt, $(args...))))
762+
return esc(:($Printf.format(stdout, $fmt, $(args...))))
764763
else
765764
io = io_or_fmt
766765
isempty(args) && throw(ArgumentError("must provide required format string"))

0 commit comments

Comments
 (0)