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 557786 - Array member handling not correct
Array member handling not correct
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-10-24 16:18 UTC by Andreas Rottmann
Modified: 2015-02-07 16:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Implements support for array members, preserving their declared size (11.84 KB, patch)
2008-10-24 16:46 UTC, Andreas Rottmann
none Details | Review

Description Andreas Rottmann 2008-10-24 16:18:24 UTC
The current scanner code generates a bogus result for array members, e.g.:

typedef struct
{
  guint8 data[16];
} UtilityStruct;

Gives:

<record ...>
      <field name="data" writable="1">
        <type name="uint8" c:type="guint8"/>
      </field>
</record>

The size information is lost, as well as the fact that it's an array.

I'm working on a patch (it just needs some work in the typelib compiler, the parser part should already be ok).
Comment 1 Andreas Rottmann 2008-10-24 16:46:57 UTC
Created attachment 121289 [details] [review]
Implements support for array members, preserving their declared size
Comment 2 Colin Walters 2008-10-25 15:25:54 UTC
I changed the public API names to _get_array_fixed_size to be more clear about the difference between "size" and "length".

Thanks for the patch!

Committed r814
	M	ChangeLog
	M	girepository/girparser.c
	M	girepository/ginfo.c
	M	girepository/girepository.h
	M	girepository/gtypelib.h
	M	girepository/girnode.c
	M	girepository/girnode.h
	M	tools/generate.c
	M	tests/scanner/utility.h
	M	tests/scanner/utility-1.0-expected.tgir
	M	tests/scanner/utility-1.0-expected.gir
	M	giscanner/transformer.py
	M	giscanner/sourcescanner.c
	M	giscanner/sourcescanner.h
	M	giscanner/girwriter.py
	M	giscanner/scannerparser.y
	M	giscanner/ast.py
r814 = d66174d194e135c86e54542714dc337f57a4e758 (git-svn)
Comment 3 André Klapper 2015-02-07 16:54:44 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]