Skip to content

Commit 63997e6

Browse files
committed
fix: ifdeffery for H5O_info_t raw_info.
The logic is that we always want `H5O_info1_t`. However, in very old versions of HDF5 it was called `H5O_info_t` instead.
1 parent 7853b02 commit 63997e6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/highfive/H5Object.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,13 @@ class ObjectInfo {
133133
time_t getModificationTime() const noexcept;
134134

135135
private:
136-
#if (H5Oget_info_vers < 3)
137-
H5O_info_t raw_info;
138-
#else
139-
// Use compat H5O_info1_t while getAddress() is supported (deprecated)
136+
#if H5O_info_t_vers >= 1
137+
// Use most widely available version because we don't use any of the newer
138+
// data.
140139
H5O_info1_t raw_info;
140+
#else
141+
// For HDF5 versions prior to H5O_info1_t.
142+
H5O_info_t raw_info;
141143
#endif
142144

143145
friend class Object;

0 commit comments

Comments
 (0)