Skip to content

Commit

Permalink
Fix most of 0.7 depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Jul 23, 2017
1 parent fce848c commit 5582169
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/HDF5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using Compat

using Base: unsafe_convert

import Base:
import Base:
close, convert, done, eltype, endof, flush, getindex, ==,
isempty, isvalid, length, names, ndims, next, parent, read,
setindex!, show, size, sizeof, start, write, isopen
Expand Down Expand Up @@ -1411,16 +1411,16 @@ function read_row(io::IO, membertype, membersize)
row = Any[]
for (dtype, dsize) in zip(membertype, membersize)
if dtype === String
push!(row, unpad(read(io, UInt8, dsize), H5T_STR_NULLPAD))
push!(row, unpad(read!(io, Vector{UInt8}(dsize)), H5T_STR_NULLPAD))
elseif dtype <: HDF5.FixedArray && eltype(dtype) <: HDF5BitsKind
val = read(io, eltype(dtype), prod(size(dtype)))
val = read!(io, Vector{eltype(dtype)}(prod(size(dtype))))
push!(row, reshape(val, size(dtype)))
elseif dtype <: HDF5BitsKind
push!(row, read(io, dtype))
else
# for other types, just store the raw bytes and let the user
# decide what to do
push!(row, read(io, UInt8, dsize))
push!(row, read!(io, Vector{UInt8}(dsize)))
end
end
return (row...)
Expand Down

0 comments on commit 5582169

Please sign in to comment.