Skip to content

Commit

Permalink
A few fixes for 0.4 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 18, 2016
1 parent c6c7117 commit d8933b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Source.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ end

# construct a new Source from a Sink that has been streamed to (i.e. DONE)
function Source(s::CSV.Sink)
# Data.isdone(s) || throw(ArgumentError("::Sink has not been closed to streaming yet; call `close(::Sink)` first"))
io = s.data
if isa(io,IOStream)
nm = String(chop(replace(io.name,"<file ","")))
Expand All @@ -185,6 +184,11 @@ function Source(s::CSV.Sink)
nm = String("")
end
seek(data,s.datapos)
for (i, T) in enumerate(s.schema.types)
if T <: AbstractString
s.schema.types[i] = WeakRefString{UInt8}
end
end
return Source(s.schema,s.options,data,s.datapos,nm)
end

Expand Down

0 comments on commit d8933b4

Please sign in to comment.