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 556732 - generate gir files consistently
generate gir files consistently
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-10-17 13:57 UTC by Tommi Komulainen
Modified: 2015-02-07 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
write property attributes consistently (3.25 KB, patch)
2008-10-17 13:58 UTC, Tommi Komulainen
committed Details | Review
write field attributes consistently (13.49 KB, patch)
2008-10-17 13:58 UTC, Tommi Komulainen
committed Details | Review
write 'direction' attribute consistently (3.92 KB, patch)
2008-10-17 13:58 UTC, Tommi Komulainen
committed Details | Review
write 'transfer-ownership' attribute consistently (3.68 KB, patch)
2008-10-17 13:59 UTC, Tommi Komulainen
committed Details | Review

Description Tommi Komulainen 2008-10-17 13:57:21 UTC
girwriter.py and generate.c are generating slightly different output
* attributes with default values (not) omitted
* <parameter transfer-ownership=..> vs. <parameter transfer=..>
* missing readable/writable attributes for fields
* missing construct attribute for properties

Following patches should bring the two closer together, mainly using girwriter.py as model.
Comment 1 Tommi Komulainen 2008-10-17 13:58:00 UTC
Created attachment 120781 [details] [review]
write property attributes consistently
Comment 2 Tommi Komulainen 2008-10-17 13:58:23 UTC
Created attachment 120782 [details] [review]
write field attributes consistently
Comment 3 Tommi Komulainen 2008-10-17 13:58:50 UTC
Created attachment 120783 [details] [review]
write 'direction' attribute consistently
Comment 4 Tommi Komulainen 2008-10-17 13:59:17 UTC
Created attachment 120784 [details] [review]
write 'transfer-ownership' attribute consistently
Comment 5 Johan (not receiving bugmail) Dahlin 2008-10-17 14:02:30 UTC
Comment on attachment 120782 [details] [review]
write field attributes consistently

Looks great!

>diff --git a/tools/generate.c b/tools/generate.c
>+  /* Fields are assumed to be read-only (see also girwriter.py) */
>+  if ((!flags & GI_FIELD_IS_READABLE))

You don't need the extra parenthesis here.
Comment 6 Tommi Komulainen 2008-10-17 14:30:28 UTC
(In reply to comment #5)
> >+  if ((!flags & GI_FIELD_IS_READABLE))
> 
> You don't need the extra parenthesis here.

Ouch, it is supposed to be:
   if (!(flags & GI_FIELD_IS_READABLE))
Comment 7 Tommi Komulainen 2008-10-17 15:02:14 UTC
The change in comment 6 exposed different default in girparser.c (readable=0, writable=)
Changed that to follow same defaults as elsewhere, that is readable=1, writable=0

Committed as r742 through r745
Comment 8 André Klapper 2015-02-07 16:58:29 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]