GNOME Bugzilla – Bug 710561
giscanner: Correctly consume field array annotations on structs
Last modified: 2015-02-07 16:46:52 UTC
Currently array annotations on struct fields are completely ignored, due to a hidden internal exception in the code.
Created attachment 257777 [details] [review] giscanner: Correctly consume field annotations on structs A hidden exception was being thrown (which we now log), due to fields being treated as function parameters. Fixed to make field array annotations be transformed and written out to the gir correctly.
Review of attachment 257777 [details] [review]: Only one very minor comment. ::: giscanner/girwriter.py @@ +315,3 @@ + length = parent.get_field_index(ntype.length_param_name) + else: + assert False, "parent not a callable or compound: %s" % str(parent) %r is used more often than %s + str() ::: giscanner/maintransformer.py @@ +142,3 @@ + "can't find field %s referenced by %s of %r" + % (field_name, origin_name, parent.name)) + I'm a little uncertain about making this hard fatal, but let's just see what happens; if we need to downgrade to a warning we can do it later. @@ -733,1 @@ Ouch, it's definitely evil to just eat exceptions like this. Thanks for fixing this.
*** Bug 687545 has been marked as a duplicate of this bug. ***
Attachment 257777 [details] pushed as 2a569cb - giscanner: Correctly consume field annotations on structs
Created attachment 258344 [details] [review] giscanner: Test fixups for field annotations and documentation Related to:
Review of attachment 258344 [details] [review]: Looks reasonable to me. Thanks!
Comment on attachment 258344 [details] [review] giscanner: Test fixups for field annotations and documentation Pushed by colin to master.
Created attachment 258797 [details] [review] giscanner: Correctly consume field annotations on structs Patch for gnome-3-8 branch in case anyone needs it.
*** Bug 594294 has been marked as a duplicate of this bug. ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]