-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch HDoff_t to haddr_t in the public API #5082
base: develop
Are you sure you want to change the base?
Conversation
Note that this switches the parameter from signed to unsigned, which generates downstream warnings that will have to be addressed.
I am puzzled with this the switch from off_t to haddr_t. The parameter is used for the offsets in external files that ARE not HDF5 files. haddr_t corresponds to an offset in a logical HDF5 file. Are you sure, this is a correct approach? |
off_t isn't portable, so it really should be replaced with something that is (HDoff_t is what we use internally). I originally had it as HDoff_t, which I moved to the public API, then wanted to switch the name to something more in line with the other HDF5 primitive types (hoff_t, like hsize_t) and got pushback from Quincey about the semantics of HD* vs h*. We compromised on haddr_t, which is logically reasonable, a 64-bit type, and portable. We're not using the offset parameter to seek to negative offsets, so the semantics of off_t aren't really necessary and haddr_t makes more semantic sense than an arbitrary integer. I see your point, though. A haddr_t isn't really a physical offset if there's a user block, so the semantics are a bit different. I just really want to get rid of off_t. Non-standard-C types are annoying to support. |
I don't think we can have a good solution here. |
Let's use uint64_t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to make sure not to merge this to 1.14
That won't be a problem. We don't maintain the 1.14 branch anymore and a 1.14.6 release (if that happens) will basically be a patch release with a few bugfixes cherry-picked into a copy of the 1.14.5 release branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to the Release.txt the Fortran changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to the Fortran Section:
The offset parameter was changed for H5P(set|get)_external_f() from an INTEGER of KIND OFF_T to HADDR_T, and the OFF_T parameter is no longer a defined INTEGER KIND.
Moves HDoff_t out of the public API and replaces the HDoff_t
parameter type in H5Pset/get_external() with a haddr_t.
Also removes OFF_T from the Fortran public API.