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 5d2bbe0 commit b80f735
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lzf/lzf_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,22 @@
#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)
#define H5PY_H5Z_NEWCLS 1
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8
#define H5PY_H5Z_NEWCLS 0
#elif H5_VERS_MAJOR == 1 && H5_VERS_MINOR >= 8 && H5_VERS_RELEASE >= 3 && H5_USE_16_API
#define H5PY_H5Z_NEWCLS 0
#else
#define H5PY_H5Z_NEWCLS 0
#define H5PY_H5Z_NEWCLS 1
#endif

size_t lzf_filter(unsigned flags, size_t cd_nelmts,
Expand Down

0 comments on commit b80f735

Please sign in to comment.