Skip to content

Commit

Permalink
[h5l] expose only real symbols depending on the hdf5 version number
Browse files Browse the repository at this point in the history
  • Loading branch information
picca committed Sep 11, 2024
1 parent 8bd518f commit a33c1ac
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/Bindings/HDF5/Raw/H5L.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ h5l_MAX_LINK_NAME_LEN = #const H5L_MAX_LINK_NAME_LEN

-- |Information struct for link (for 'h5l_get_info' / 'h5l_get_info_by_idx')

#starttype H5L_info_t
#if H5_VERSION_GE(1,12,0)

#starttype H5L_info1_t
#field type, <H5L_type_t>
#field corder_valid, <hbool_t>
#field corder, Int64
Expand All @@ -77,9 +79,6 @@ h5l_MAX_LINK_NAME_LEN = #const H5L_MAX_LINK_NAME_LEN
#union_field u.val_size, <size_t>
#stoptype


#if H5_VERSION_GE(1,12,0)

#starttype H5L_info2_t
#field type, <H5L_type_t>
#field corder_valid, <hbool_t>
Expand All @@ -89,20 +88,25 @@ h5l_MAX_LINK_NAME_LEN = #const H5L_MAX_LINK_NAME_LEN
#union_field u.val_size, <size_t>
#stoptype

#ccall H5Lget_info1, <hid_t> -> CString -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>
#ccall H5Lget_info1, <hid_t> -> CString -> Out <H5L_info1_t> -> <hid_t> -> IO <herr_t>

#ccall H5Lget_info2, <hid_t> -> CString -> Out <H5L_info2_t> -> <hid_t> -> IO <herr_t>

h5l_get_info = h5l_get_info1

#ccall H5Lget_info_by_idx1, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>
#ccall H5Lget_info_by_idx1, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info1_t> -> <hid_t> -> IO <herr_t>

#ccall H5Lget_info_by_idx2, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info2_t> -> <hid_t> -> IO <herr_t>

h5l_get_info_by_idx = h5l_get_info_by_idx1

#else

#starttype H5L_info_t
#field type, <H5L_type_t>
#field corder_valid, <hbool_t>
#field corder, Int64
#field cset, <H5T_cset_t>
#union_field u.address, <haddr_t>
#union_field u.val_size, <size_t>
#stoptype

#ccall H5Lget_info, <hid_t> -> CString -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>

#ccall H5Lget_info_by_idx, <hid_t> -> CString -> <H5_index_t> -> <H5_iter_order_t> -> <hsize_t> -> Out <H5L_info_t> -> <hid_t> -> IO <herr_t>
Expand Down

0 comments on commit a33c1ac

Please sign in to comment.