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

Use correct type for C enumerations #7

Merged
merged 1 commit into from
Jul 1, 2018

Conversation

iliastsi
Copy link

The storage type of an enum can be any integer type big enough to cover
the required range. Use the '#type' keyword of c2hs to derive the
correct storage type for the cmark_node_type enumeration.

Note that the previous use of CUShort produced incorrect results in big
endian architectures where 'sizeof(cmark_node_type) > sizeof(CUShort)'.

Closes #6: not big-endian-safe

Signed-off-by: Ilias Tsitsimpis iliastsi@debian.org

The storage type of an enum can be any integer type big enough to cover
the required range. Use the '#type' keyword of c2hs to derive the
correct storage type for the cmark_node_type enumeration.

Note that the previous use of CUShort produced incorrect results in big
endian architectures where 'sizeof(cmark_node_type) > sizeof(CUShort)'.

Signed-off-by: Ilias Tsitsimpis <iliastsi@debian.org>
@kivikakk kivikakk mentioned this pull request Jun 29, 2018
@juhp
Copy link

juhp commented Jun 29, 2018

Thank you, here is a test build on Fedora ppc64 and s390x:
https://koji.fedoraproject.org/koji/taskinfo?taskID=27940732

@kivikakk
Copy link
Owner

kivikakk commented Jul 1, 2018

Awesome! Thank you so much!

@kivikakk kivikakk merged commit e96ad6e into kivikakk:master Jul 1, 2018
@kivikakk
Copy link
Owner

kivikakk commented Jul 1, 2018

I’ll make a new release of this tomorrow ❤️

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.

3 participants