Skip to content

Commit

Permalink
better solution to my opinion when we deal with hdf5 symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
picca committed Aug 9, 2024
1 parent 3d3bba5 commit 98f58e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Bindings/HDF5/Dataspace.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ encodeDataspace (Dataspace space_id) =
withOutByteString $ \buf bufSz ->
withInOut_ bufSz $ \ioBufSz ->
withErrorCheck_ $
h5s_encode1 space_id buf ioBufSz
h5s_encode space_id buf ioBufSz

decodeDataspace :: BS.ByteString -> IO Dataspace
decodeDataspace bs = BS.unsafeUseAsCString bs $ \buf ->
Expand Down
2 changes: 1 addition & 1 deletion src/Bindings/HDF5/Raw/H5S.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ import Foreign.Ptr.Conventions
#if H5_VERSION_GE(1,12,0)
# ccall H5Sencode2, <hid_t> -> OutArray CChar -> InOut <size_t> -> <hid_t> -> IO <herr_t>
# ccall H5Sencode1, <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t>
h5s_encode = h5s_encode1
#else
# ccall H5Sencode, <hid_t> -> OutArray CChar -> InOut <size_t> -> IO <herr_t>
h5s_encode1 = h5s_encode
#endif

-- |Decode a binary object description of dataspace and
Expand Down

0 comments on commit 98f58e3

Please sign in to comment.