This code comes from https://github.com/Flared/purple-icq/tree/master/src/purple It is GPL-3 licensed
12 lines
272 B
Rust
12 lines
272 B
Rust
pub struct Plugin(*mut purple_sys::PurplePlugin);
|
|
|
|
impl Plugin {
|
|
pub unsafe fn from_raw(ptr: *mut purple_sys::PurplePlugin) -> Self {
|
|
Plugin(ptr)
|
|
}
|
|
|
|
pub unsafe fn extra<'a, T>(&mut self) -> &'a mut T {
|
|
&mut *((*self.0).extra as *mut T)
|
|
}
|
|
}
|