Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
glib: Make TypedValue<T> #[repr(C)]
Browse files Browse the repository at this point in the history
This allows to use them directly wherever a GValue is used in FFI by
transmuting
  • Loading branch information
sdroege committed Nov 15, 2017
1 parent d3d5754 commit 2bb5d2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/value.rs
Expand Up @@ -420,6 +420,7 @@ impl Drop for ValueArray {
///
/// See the [module documentation](index.html) for more details.
#[derive(Clone)]
#[repr(C)]
pub struct TypedValue<T>(Value, PhantomData<*const T>);

impl<'a, T: FromValueOptional<'a> + SetValue> TypedValue<T> {
Expand Down

0 comments on commit 2bb5d2d

Please sign in to comment.