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

Cast enum/bitfield values to gint/guint for sys tests #658

Merged
merged 1 commit into from Nov 10, 2018

Conversation

Projects
None yet
2 participants
@sdroege
Copy link
Member

sdroege commented Nov 10, 2018

GLib assumes that these are gint/guint internally so sign differences
don't really make a difference here, but cause test failures otherwise.

Fixes #572

Cast enum/bitfield values to gint/guint for sys tests
GLib assumes that these are gint/guint internally so sign differences
don't really make a difference here, but cause test failures otherwise.

Fixes #572
@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 10, 2018

Looks good,
but not better add field signed:bool to CConstant and print "(g[u]?int)" when writing RUST_CONSTANTS ?

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 10, 2018

Hm, I missed that we have normal constants too.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 10, 2018

@sdroege I can merge current version, if you don't want bother with new field (it need be enum).

@sdroege

This comment has been minimized.

Copy link
Member Author

sdroege commented Nov 10, 2018

I think the current version is better, otherwise it only adds code for the flag that is then passed again to the same formatting code for that case :) I thought about doing that but it seems to not help code readability.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 10, 2018

You right, I merge then. Thanks

@EPashkin EPashkin merged commit dd33bdf into gtk-rs:master Nov 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.