rhdf5 icon indicating copy to clipboard operation
rhdf5 copied to clipboard

Standardise return types

Open grimbough opened this issue 4 years ago • 0 comments

The return types for many of the H5X are all over the place. In most cases they return the same as the equivalent C function i.e. 0 for success (e.g. H5Aclose) , other times they return TRUE for success (e.g. H5Aexists).

This is compounded by cases where the return type and documentation do not match e.g. h5errorHandling returns NULL under all circumstances, but the docs say "Returns 0 if options are set successfully." This has been reported before in #43

This should be standardised across the package, and the documentation updated to reflect the new style. However it's unknown whether there are many instances where the return types are used by dependent packages. Changing 0 to TRUE will be a breaking change, so care needs to be taken before rolling this out.

grimbough avatar May 12 '21 09:05 grimbough