Skip to content

Commit

Permalink
fix(lzf_filter.c): fix H5Z_class_t definition for newer hdf5 api
Browse files Browse the repository at this point in the history
Closes #153
  • Loading branch information
ljgray committed Aug 12, 2024
1 parent a6b712a commit 8e78739
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lzf/lzf_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@
#endif

/* Deal with the mutiple definitions for H5Z_class_t.
Note: Only HDF5 1.6 and 1.8 are supported.
Note: HDF5 1.6 and >= 1.8 are supported.
See https://portal.hdfgroup.org/hdf5/develop/group___h5_z.html#title6
for version history.
(1) The old class should always be used for HDF5 1.6
(2) The new class should always be used for HDF5 1.8 < 1.8.3
(3) The old class should be used for HDF5 1.8 >= 1.8.3 only if the
(3) The old class should be used for HDF5 >= 1.8.3 only if the
macro H5_USE_16_API is set
*/

#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 8 && (H5_VERS_RELEASE < 3 || !H5_USE_16_API)
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR >= 8 && H5_VERS_RELEASE >= 3
#define H5PY_H5Z_NEWCLS 1
#elif H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 8 && (H5_VERS_RELEASE < 3 || !H5_USE_16_API)
#define H5PY_H5Z_NEWCLS 1
#else
#define H5PY_H5Z_NEWCLS 0
Expand Down

0 comments on commit 8e78739

Please sign in to comment.