HDFGroup / HDFGroup/hdf5

Change signature of H5Tget_member_offset()

Open
#6,243 0 comments 0 reactions 1 assignee Claimed by @fortnern View on GitHub
Component - C Library
Dominant language
C
Stars
988
Forks
355
Avg merge
4d 2h
Merged PRs (30d)
12

Description

H5Tget_member_offset() can fail, but it currently has no coherent way to return a failure, since the return value of the function is the offset, the function returns 0 on failure, and 0 is also a valid offset. We should modify the function to be able to unambiguously return failure.

We should probably do this by moving the offset returned to a separate parameter and returning herr_t:

`herr_t H5Tget_member_offset2(hid_t type_id, unsigned membno, size_t *offset)`

But if that is objectionably different from other similar functions we could instead return ssize_t and use -1 as the error value, though this could cause latent compatibility issues. Either approach will require versioning the function.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.