GNOME Bugzilla – Bug 556732
generate gir files consistently
Last modified: 2015-02-07 16:58:29 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.
Created attachment 120781 [details] [review] write property attributes consistently
Created attachment 120782 [details] [review] write field attributes consistently
Created attachment 120783 [details] [review] write 'direction' attribute consistently
Created attachment 120784 [details] [review] write 'transfer-ownership' attribute consistently
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.
(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))
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
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]