Skip to content

Commit 141eccf

Browse files
committed
fix: Fix API compatibility for ObjectReference1
1 parent 5c819b3 commit 141eccf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hdf5/src/hl/references/legacy.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ impl ObjectReference for ObjectReference1 {
5959

6060
fn dereference(&self, location: &Location) -> Result<ReferencedObject> {
6161
let object_type = self.get_object_type(location)?;
62+
#[cfg(feature = "1.10.0")]
6263
let object_id =
6364
h5call!(H5Rdereference(location.id(), H5P_DEFAULT, H5R_OBJECT1, self.ptr()))?;
65+
#[cfg(not(feature = "1.10.0"))]
66+
let object_id = h5call!(H5Rdereference(location.id(), H5R_OBJECT1, self.ptr()))?;
6467
ReferencedObject::from_type_and_id(object_type, object_id)
6568
}
6669
}

0 commit comments

Comments
 (0)