GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
See individual commits.
The object ones are preventing the obj.clone().downcast::<Foo>() calls I have in various places
The object casts are safe because all the types have the same memory representation apart from their name and the phantom data type, and IsA is an unsafe trait so must only be implemented if it's actually a proper GObject wrapper type
The value transmutes are safe because the only difference between Value and TypedValue is the zero-sized phantom data.
This comment not better be in code? ;)
Add downcast_ref() variants for all Value-related types
Remove unneeded type annotation
Fix function call in docs example
Add downcast_ref() and upcast_ref() and dynamic_cast_ref() variants f…
…or all the Object casts
@sdroege Looks good
I clearly don't know enough this part of GLib and the code looks good to me so I'll trust you and @EPashkin's opinion on this one. Thanks!