Skip to content
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

hdf5: fix build for >go1.8 #10

Merged
merged 1 commit into from Aug 12, 2017
Merged

hdf5: fix build for >go1.8 #10

merged 1 commit into from Aug 12, 2017

Conversation

kortschak
Copy link
Member

@sbinet Please take a look.

@@ -188,7 +188,7 @@ func (t *Datatype) Size() uint {
}

// SetSize sets the total size of a Datatype.
func (t *Datatype) SetSize(sz uint) error {
func (t *Datatype) SetSize(sz int) error {
Copy link
Member Author

@kortschak kortschak Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is incorrect for 32 bit systems (but so was the previous code).

Either there should be a build tag for the 32 bit case, or there should be a special case for -1 to send int64(-1), or sz should be int64.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, on a 32 bit arch, int and size_t are probably still the same size (though not guaranteed). I think we may want to have some init checks for things like this at some stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants