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

codegen: use C value instead of hardcoding it #1152

Merged
merged 1 commit into from
May 23, 2021
Merged

codegen: use C value instead of hardcoding it #1152

merged 1 commit into from
May 23, 2021

Conversation

bilelmoussaoui
Copy link
Member

@bilelmoussaoui bilelmoussaoui commented May 23, 2021

See gtk-rs/gtk4-rs#397 for the resulted changes

cc @GuillaumeGomez, i suppose that's why we had such code in gtk's ResponseType, basically based on what gir generates :)

Copy link
Contributor

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

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

Nice find! The FFI layer should be in control of the constants, not the safe wrapper layer 😬

Do change the title of the PR/commit to codegen/enum: Use FFI constant instead of (hardcoding) integer value though; I had no idea what this PR was about until reading the code ;)

@sdroege sdroege merged commit 842e337 into gtk-rs:master May 23, 2021
@bilelmoussaoui bilelmoussaoui deleted the bilelmoussaoui/enums-use-c-type branch May 23, 2021 08:13
@GuillaumeGomez
Copy link
Member

MUCH better!

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.

4 participants