New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate unions #78

Merged
merged 1 commit into from Feb 2, 2018

Conversation

Projects
None yet
4 participants
@EPashkin
Member

EPashkin commented Feb 1, 2018

Apply of gtk-rs/gir#527 and girs from Ubuntu Bionic Beaver

cc @GuillaumeGomez. @sdroege

@@ -23,6 +23,7 @@ v2_28 = []
v2_30 = ["v2_28"]
v2_32 = ["v2_30"]
v2_36 = ["v2_32"]
v2_36_8 = ["v2_36"]

This comment has been minimized.

@sdroege

sdroege Feb 1, 2018

Member

Also regen with new gir files I guess?

This comment has been minimized.

@EPashkin
@@ -3369,16 +3553,31 @@ pub struct GdkEventScroll {
pub delta_x: c_double,
pub delta_y: c_double,
_truncated_record_marker: c_void,
//is_stop: guint: 1,
// /*Ignored*/field is_stop has incomplete type

This comment has been minimized.

@sdroege

sdroege Feb 1, 2018

Member

This looks a bit weird an IMHO the previous version had some useful further information

//is_seekable: guint: 1,
//reserved1: gpointer,
//reserved2: gpointer,
// /*Ignored*/field read_cd has incomplete type

This comment has been minimized.

@sdroege

sdroege Feb 1, 2018

Member

Previously that field was considered complete and generated (but other ones later not)

This comment has been minimized.

@EPashkin

EPashkin Feb 1, 2018

Member

This because now fields with void types skipped.

#[repr(C)]
pub struct GIConv(c_void);

impl ::std::fmt::Debug for GIConv {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GIConv @ {:?}", self as *const _))
         .finish()
    }
}

This comment has been minimized.

@sdroege

sdroege Feb 1, 2018

Member

GIConv should be a *mut c_void:

typedef struct _GIConv *GIConv;

This comment has been minimized.

@EPashkin

EPashkin Feb 1, 2018

Member

It was pub struct GIConv; here from beginning and changed to pub struct GIConv(c_void); 2 year ago in 3a2242b.
IMHO this because it had disguised="1" and contains no fields

This comment has been minimized.

@sdroege

sdroege Feb 1, 2018

Member

Not that I care about this specific one, but it should really be struct GIConv(*mut c_void) :) We don't know the fields, but the GIConv type is always a pointer. Unlike other cases like typedef struct _Foo Foo without struct _Foo in any headers

This comment has been minimized.

@tmiasko

tmiasko Feb 1, 2018

Contributor

Unfortunately disguised="1" is not exactly to be trusted right now: https://bugzilla.gnome.org/show_bug.cgi?id=721481

This comment has been minimized.

@EPashkin

EPashkin Feb 1, 2018

Member

@tmiasko Thanks for info, I even don't know that disguised="1" planned only for typedef struct _X *X;

This comment has been minimized.

@EPashkin

EPashkin Feb 2, 2018

Member

Added issue gtk-rs/gir#529 as reminder

@sdroege

This comment has been minimized.

Member

sdroege commented Feb 1, 2018

Generally looks good to me while shortly looking over everything

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 2, 2018

Looks good to me as well so I merge. Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 8cca9ee into gtk-rs:master Feb 2, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment