From a33c1ace239e06304b52306149ee6d019a51d2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Wed, 11 Sep 2024 12:49:24 +0200 Subject: [PATCH] [h5l] expose only real symbols depending on the hdf5 version number --- src/Bindings/HDF5/Raw/H5L.hsc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/Bindings/HDF5/Raw/H5L.hsc b/src/Bindings/HDF5/Raw/H5L.hsc index f122e6d..2559add 100644 --- a/src/Bindings/HDF5/Raw/H5L.hsc +++ b/src/Bindings/HDF5/Raw/H5L.hsc @@ -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, #field corder_valid, #field corder, Int64 @@ -77,9 +79,6 @@ h5l_MAX_LINK_NAME_LEN = #const H5L_MAX_LINK_NAME_LEN #union_field u.val_size, #stoptype - -#if H5_VERSION_GE(1,12,0) - #starttype H5L_info2_t #field type, #field corder_valid, @@ -89,20 +88,25 @@ h5l_MAX_LINK_NAME_LEN = #const H5L_MAX_LINK_NAME_LEN #union_field u.val_size, #stoptype -#ccall H5Lget_info1, -> CString -> Out -> -> IO +#ccall H5Lget_info1, -> CString -> Out -> -> IO #ccall H5Lget_info2, -> CString -> Out -> -> IO -h5l_get_info = h5l_get_info1 - -#ccall H5Lget_info_by_idx1, -> CString -> -> -> -> Out -> -> IO +#ccall H5Lget_info_by_idx1, -> CString -> -> -> -> Out -> -> IO #ccall H5Lget_info_by_idx2, -> CString -> -> -> -> Out -> -> IO -h5l_get_info_by_idx = h5l_get_info_by_idx1 - #else +#starttype H5L_info_t +#field type, +#field corder_valid, +#field corder, Int64 +#field cset, +#union_field u.address, +#union_field u.val_size, +#stoptype + #ccall H5Lget_info, -> CString -> Out -> -> IO #ccall H5Lget_info_by_idx, -> CString -> -> -> -> Out -> -> IO