servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Improve union field accessors in generated bindings #202

Open michaelwu opened 8 years ago

michaelwu commented 8 years ago

From https://github.com/servo/rust-mozjs/pull/198

<jdm> but yeah, I'd be inclined to rewrite all of the generated transmutes to be pointer casts instead
<jdm> let raw = &mut self._bindgen_data_1_ as *mut _ as *mut u8; raw.offset(0) as *mut _