Skip to content

Commit

Permalink
fix: Fix API compatibility for ObjectReference1
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMc86 committed Nov 16, 2024
1 parent 5c819b3 commit 141eccf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hdf5/src/hl/references/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ impl ObjectReference for ObjectReference1 {

fn dereference(&self, location: &Location) -> Result<ReferencedObject> {
let object_type = self.get_object_type(location)?;
#[cfg(feature = "1.10.0")]
let object_id =
h5call!(H5Rdereference(location.id(), H5P_DEFAULT, H5R_OBJECT1, self.ptr()))?;
#[cfg(not(feature = "1.10.0"))]
let object_id = h5call!(H5Rdereference(location.id(), H5R_OBJECT1, self.ptr()))?;
ReferencedObject::from_type_and_id(object_type, object_id)
}
}

0 comments on commit 141eccf

Please sign in to comment.