From 7559e08363b081291b16bae16dc7b3ec61b3685b Mon Sep 17 00:00:00 2001 From: Mustafa Mohamad Date: Tue, 11 Jul 2023 23:41:12 -0600 Subject: [PATCH] Fix haddr_t and object_info deprecations --- src/JLD.jl | 2 +- src/jld_types.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/JLD.jl b/src/JLD.jl index 2e9b66b..f36320d 100644 --- a/src/JLD.jl +++ b/src/JLD.jl @@ -693,7 +693,7 @@ function write_ref(parent::JldFile, data, wsession::JldWriteSession) dset = _write(gref, name, writeas(data), wsession) # Add reference to reference list - ref = HDF5.Reference(HDF5.API.hobj_ref_t(object_info(dset).addr)) + ref = HDF5.Reference(HDF5.API.hobj_ref_t(HDF5.API.h5o_get_info1(HDF5.checkvalid(dset)).addr)) close(dset) if !isa(data, Tuple) && ismutable(data) wsession.h5ref[data] = ref diff --git a/src/jld_types.jl b/src/jld_types.jl index 360a0f4..781531b 100644 --- a/src/jld_types.jl +++ b/src/jld_types.jl @@ -687,7 +687,7 @@ function jldatatype(parent::JldFile, dtype::HDF5.Datatype) elseif class_id == HDF5.API.H5T_BITFIELD Bool elseif class_id == HDF5.API.H5T_COMPOUND || class_id == HDF5.API.H5T_OPAQUE - addr = object_info(dtype).addr + addr = HDF5.API.h5o_get_info1(HDF5.checkvalid(dtype)).addr haskey(parent.h5jltype, addr) && return parent.h5jltype[addr] typename = read_attribute(dtype, name_type_attr) @@ -805,11 +805,11 @@ end # it's already many times faster than calling H5Iget_name with a lot of # data in the file, and it only needs to be called once per type. # Revisit if this ever turns out to be a bottleneck. -function typeindex(parent::JldFile, addr::HDF5.haddr_t) +function typeindex(parent::JldFile, addr::HDF5.API.haddr_t) gtypes = parent.plain[pathtypes] i = 1 for x in gtypes - if object_info(x).addr == addr + if HDF5.API.h5o_get_info1(HDF5.checkvalid(x)).addr == addr return i end i += 1