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

glib: Add an Object specific value type checker #555

Merged
merged 1 commit into from Feb 17, 2022

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Feb 17, 2022

This doesn't only check the type of the Value itself but if there's a
mismatch it grabs the contained object and does a check against the
concrete type of the object too.

This is necessary if e.g. the Value is initialized for a plain
Object, a gtk::Widget is stored inside it and it is tried to be
retrieved as gtk::Widget instead of Object.


CC @BrainBlasted @kavanmevada

This doesn't only check the type of the `Value` itself but if there's a
mismatch it grabs the contained object and does a check against the
concrete type of the object too.

This is necessary if e.g. the `Value` is initialized for a plain
`Object`, a `gtk::Widget` is stored inside it and it is tried to be
retrieved as `gtk::Widget` instead of `Object`.
@sdroege sdroege merged commit 75cddc8 into gtk-rs:master Feb 17, 2022
@sdroege sdroege deleted the object-value-type-checker branch February 17, 2022 09:25
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