Skip to content

Commit 3c5c187

Browse files
Adam Brewstermusm
authored andcommitted
Fixes for 0.7
1 parent 90d011a commit 3c5c187

File tree

12 files changed

+103
-97
lines changed

12 files changed

+103
-97
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
julia 0.6
22
BinDeps 0.6.0
33
Blosc
4-
Compat 0.32.0
4+
Compat 0.61.0
55
@osx Homebrew 0.3.1
66
@windows WinRPM

deps/build.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using BinDeps
22
using Compat
3+
using Compat.Libdl
34

45
@BinDeps.setup
56

src/HDF5.jl

Lines changed: 75 additions & 73 deletions
Large diffs are not rendered by default.

src/blosc_filter.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ struct H5Z_class2_t
1515
encoder_present::Cuint # Does this filter have an encoder?
1616
decoder_present::Cuint # Does this filter have a decoder?
1717
name::Ptr{UInt8} # Comment for debugging
18-
can_apply::Ptr{Void} # The "can apply" callback
19-
set_local::Ptr{Void} # The "set local" callback
20-
filter::Ptr{Void} # The filter callback
18+
can_apply::Ptr{Cvoid} # The "can apply" callback
19+
set_local::Ptr{Cvoid} # The "set local" callback
20+
filter::Ptr{Cvoid} # The filter callback
2121
end
2222

2323
const FILTER_BLOSC_VERSION = 2
2424
const FILTER_BLOSC = 32001 # Filter ID registered with the HDF Group for Blosc
2525
const blosc_name = "blosc"
2626

27-
const blosc_flags_ = Vector{Cuint}(1)
28-
const blosc_nelements_ = Vector{Csize_t}(1)
29-
const blosc_values = Vector{Cuint}(8)
30-
const blosc_chunkdims = Vector{Hsize}(32)
27+
const blosc_flags_ = Vector{Cuint}(undef,1)
28+
const blosc_nelements_ = Vector{Csize_t}(undef,1)
29+
const blosc_values = Vector{Cuint}(undef,8)
30+
const blosc_chunkdims = Vector{Hsize}(undef,32)
3131
function blosc_set_local(dcpl::Hid, htype::Hid, space::Hid)
3232
blosc_nelements_[1] = 8
3333
if ccall((:H5Pget_filter_by_id2,libhdf5), Herr,
@@ -75,7 +75,7 @@ end
7575

7676
function blosc_filter(flags::Cuint, cd_nelmts::Csize_t,
7777
cd_values::Ptr{Cuint}, nbytes::Csize_t,
78-
buf_size::Ptr{Csize_t}, buf::Ptr{Ptr{Void}})
78+
buf_size::Ptr{Csize_t}, buf::Ptr{Ptr{Cvoid}})
7979
typesize = unsafe_load(cd_values, 3) # The datatype size
8080
outbuf_size = unsafe_load(cd_values, 4)
8181
# Compression level:
@@ -122,7 +122,7 @@ function register_blosc()
122122
c_blosc_set_local = cfunction(blosc_set_local, Herr, Tuple{Hid,Hid,Hid})
123123
c_blosc_filter = cfunction(blosc_filter, Csize_t,
124124
Tuple{Cuint, Csize_t, Ptr{Cuint}, Csize_t,
125-
Ptr{Csize_t}, Ptr{Ptr{Void}}})
125+
Ptr{Csize_t}, Ptr{Ptr{Cvoid}}})
126126
if ccall((:H5Zregister, libhdf5), Herr, (Ref{H5Z_class2_t},),
127127
H5Z_class2_t(H5Z_CLASS_T_VERS,
128128
FILTER_BLOSC,

src/datafile.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Types inheriting from DataFile should have names, read, and write
1010
# methods
1111

12-
@compat abstract type DataFile end
12+
abstract type DataFile end
1313

1414
import Base: read, write
1515

@@ -40,7 +40,7 @@ read(f::Base.Callable, parent::DataFile, name::String...) =
4040
# Read every variable in the file
4141
function read(f::DataFile)
4242
vars = names(f)
43-
vals = Vector{Any}(length(vars))
43+
vals = Vector{Any}(undef,length(vars))
4444
for i = 1:length(vars)
4545
vals[i] = read(f, vars[i])
4646
end

test/extend_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using HDF5
2-
using Base.Test
2+
using Compat.Test
33

44
@testset "extendtest" begin
55

test/external.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using HDF5
2-
using Base.Test
2+
using Compat.Test
33

44
@testset "external" begin
55

test/gc.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using HDF5
2-
using Base.Test
2+
using Compat.Test
3+
import Compat.GC
34

45
macro gcvalid(args...)
56
Expr(:block, quote
6-
gc_enable(true)
7-
gc()
8-
gc_enable(false)
7+
GC.enable(true)
8+
GC.gc()
9+
GC.enable(false)
910
end,
1011
[:(@test HDF5.isvalid($(esc(x)))) for x in args]...)
1112
end
@@ -23,7 +24,7 @@ end
2324

2425
@testset "gc" begin
2526

26-
gc_enable(false)
27+
GC.enable(false)
2728
fn = tempname()
2829
for i = 1:10
2930
file = h5open(fn, "w")
@@ -62,7 +63,7 @@ for i = 1:10
6263
@gcvalid dt ds d g a
6364
close(file)
6465
end
65-
gc_enable(true)
66+
GC.enable(true)
6667
rm(fn)
6768

6869
end # testset gc

test/plain.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using HDF5
2-
using Base.Test
32
using Compat
3+
using Compat.Test
44

55
@testset "plain" begin
66

test/readremote.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using HDF5
2-
using Base.Test
2+
using Compat.Test
3+
using Compat.LinearAlgebra: norm
34

45
@testset "readremote" begin
56

0 commit comments

Comments
 (0)