Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #261 from GuillaumeGomez/borrow
Browse files Browse the repository at this point in the history
Add missing FromGlibBorrow implementation
  • Loading branch information
GuillaumeGomez committed Jan 21, 2019
2 parents a3b1a3d + ed751a2 commit b661c5e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,17 @@ impl<'a> From<&'a str> for Atom {
Atom::intern(r)
}
}

#[doc(hidden)]
impl FromGlibPtrBorrow<*const ffi::GdkAtom> for Atom {
unsafe fn from_glib_borrow(ptr: *const ffi::GdkAtom) -> Self {
Atom(*ptr)
}
}

#[doc(hidden)]
impl FromGlibPtrBorrow<*mut ffi::GdkAtom> for Atom {
unsafe fn from_glib_borrow(ptr: *mut ffi::GdkAtom) -> Self {
Atom(*ptr)
}
}

0 comments on commit b661c5e

Please sign in to comment.