Various improvement in documentation and a decoding function#6383
Various improvement in documentation and a decoding function#6383bmribler wants to merge 7 commits into
Conversation
- Improves documentation on the type size when creating/accessing a compound datatype with no predefined struct (GH issue HDFGroup#5371) - Provides better description of the min_meta_perc and min_raw_perc arguments in the H5Pset_page_buffer_size() (GH issue HDFGroup#5711) - Adds error checkings to an internal decoding function
| * new records. | ||
| * | ||
| * \p type_size can be obtained with \c sizeof() if the data is stored | ||
| * stored in a predefined C struct, otherwise, use H5Tget_size() on |
There was a problem hiding this comment.
extra "stored" to be removed.
| * by the identifier \p loc_id. | ||
| * | ||
| * \p type_size can be obtained with \c sizeof() if the data is stored | ||
| * stored in a predefined C struct, otherwise, use H5Tget_size() on |
There was a problem hiding this comment.
extra "stored" to be removed.
| * specified by the identifier \p loc_id. | ||
| * | ||
| * \p type_size can be obtained with \c sizeof() if the data is stored | ||
| * stored in a predefined C struct, otherwise, use H5Tget_size() on |
There was a problem hiding this comment.
extra "stored" to be removed.
| /* Validate addresses against stored_eof. | ||
| Skip for multi-file and split drivers which use relative/fractional addresses | ||
| that are not actual file offsets. */ | ||
| if (udata->f->shared->lf->cls->value != H5_VFD_MULTI) { |
There was a problem hiding this comment.
It seems a bit fragile to me to be checking for specific VFDs here, as it makes assumptions that may not hold for current or future VFDs.
| * identifier loc_id. | ||
| * | ||
| * \p type_size can be obtained with \c sizeof() if the data is | ||
| * stored in a predefined C struct, otherwise, use H5Tget_size() on |
There was a problem hiding this comment.
I'm thinking this wording might be confusing depending on how the API functions are generally used. If you have a C struct type you can simply call sizeof() on it as mentioned here. But if you don't have a struct type, are you really going to create an HDF5 compound datatype just to get the size for it (and for H5TBmake_table to re-create the same type internally), or are you more likely just going to add together the sizes of each field directly to get a size? I would think the latter approach would make more sense.
There was a problem hiding this comment.
Ah, my bad. I made a wrong assumption when I tried to improve that description following this discussion. Thanks for catching it, @jhendersonHDF!
min_meta_percandmin_raw_percarguments in the H5Pset_page_buffer_size() function’s documentation #5711)