GNOME Bugzilla – Bug 560248
"disguised structures"
Last modified: 2015-02-07 16:56:46 UTC
There are several typedefs in the GNOME stack that are "hide" their pointer nature: typedef struct _GIConv *GIConv; typedef struct _GdkAtom *GdkAtom; And are used: gsize g_iconv (GIConv converter, ...); Currently, they generate something in the gir like: <alias name="GIconv" target="none" c:type="GIconv"/> Which is all sorts of nonsense. The patch I'm attaching does two things: * It changes things so they get scanned as normal structures [records] but in the .gir it adds the 'disguised' attribute to indicate the distinction. * The generated typelib is generated as if they were *normal* structure references. As if it was: typedef struct _GIconv GIConv; gsize g_iconv (GIConv *converter, ...); I think this is is a reasonable approach. The name 'disguised' for the attribute is a little cryptic (especially since there is no docs of the .gir format anywhere to add a description to!) but
Created attachment 122368 [details] [review] Patch as described
Created attachment 122369 [details] [review] Fixup patch on top of the last one
Apart from the trivial issue that the spacing between symbol and open paren in the parser.c is inconsistent, this patch looks good.
Paren spacing fixed, two patches merged together, pushed to svn.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]