After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 560248 - "disguised structures"
"disguised structures"
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 560252
 
 
Reported: 2008-11-10 23:22 UTC by Owen Taylor
Modified: 2015-02-07 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch as described (7.49 KB, patch)
2008-11-10 23:23 UTC, Owen Taylor
none Details | Review
Fixup patch on top of the last one (970 bytes, patch)
2008-11-10 23:25 UTC, Owen Taylor
accepted-commit_now Details | Review

Description Owen Taylor 2008-11-10 23:22:12 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
Comment 1 Owen Taylor 2008-11-10 23:23:07 UTC
Created attachment 122368 [details] [review]
Patch as described
Comment 2 Owen Taylor 2008-11-10 23:25:09 UTC
Created attachment 122369 [details] [review]
Fixup patch on top of the last one
Comment 3 Colin Walters 2008-11-10 23:31:27 UTC
Apart from the trivial issue that the spacing between symbol and open paren in the parser.c is inconsistent, this patch looks good.
Comment 4 Owen Taylor 2008-11-10 23:59:21 UTC
Paren spacing fixed, two patches merged together, pushed to svn.
Comment 5 André Klapper 2015-02-07 16:56:46 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]