Vendor in a purple-sys wrapper
This code comes from https://github.com/Flared/purple-icq/tree/master/src/purple It is GPL-3 licensed
This commit is contained in:
11
src/purple/plugin.rs
Normal file
11
src/purple/plugin.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user