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:
2021-04-10 14:25:19 +01:00
parent 6237b9421d
commit f4d380876d
21 changed files with 2788 additions and 0 deletions

11
src/purple/plugin.rs Normal file
View 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)
}
}