gi-rust / grust

GObject introspection bindings for the Rust programming language
GNU Lesser General Public License v2.1
37 stars 3 forks source link

Figure out type casting #5

Closed mzabaluev closed 11 years ago

mzabaluev commented 11 years ago

A solution is needed for dynamic down- and side-casting between traits representing GObject interfaces. It should be as idiomatic Rust as possible, and invoke GObject dynamic cast checks.

mzabaluev commented 11 years ago

Mostly implemented as of 5d81d4e401b80b8f5fde9b051a46cbe2e71bac7c, but I'm not certain cast::transmute does the right thing.

mzabaluev commented 11 years ago

Yes, reinterpret_cast sounds better. Done.