Skip to content

Commit

Permalink
Fix inference problems in read_header (#78)
Browse files Browse the repository at this point in the history
This eliminates 198 invalidations from `using CategoricalArrays`.
  • Loading branch information
timholy authored Nov 2, 2020
1 parent 853aa7f commit ba88678
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/extract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,14 @@ function read_header(
metadata = copy(globals)
while true
if hdr.type in (:g, :x) # POSIX extended headers
read_extended_metadata(io, hdr.size, buf=buf, tee=tee) do key, val
if key in ("size", "path", "linkpath")
if hdr.type == :g
globals[key] = val
let hdr=hdr #15276
read_extended_metadata(io, hdr.size, buf=buf, tee=tee) do key, val
if key in ("size", "path", "linkpath")
if hdr.type == :g
globals[key] = val
end
metadata[key] = val
end
metadata[key] = val
end
end
elseif hdr.path == "././@LongLink" && hdr.type in (:L, :K)
Expand Down

0 comments on commit ba88678

Please sign in to comment.