GNOME Bugzilla – Bug 699533
giscanner: some small cleanup patches
Last modified: 2015-02-07 16:46:24 UTC
broken out of some larger work as individual commits for easy review
Created attachment 243113 [details] [review] giscanner: Define source and header filename extensions only once Enables us to to use a more effecient list membership test instead of testing the end of some string multiple times.
Created attachment 243114 [details] [review] giscanner: small cpp_args cleanup No need for two variables...
Created attachment 243115 [details] [review] giscanner: simplify the MainTransformer().transform() method The ast.Namespace.names instance attribute is an OrderedDict which itself is a specialised dict() subclass. There are any number of ways to test if a dict() is empty or not. Creating a copy of it's keys by iterating over them just to count the number of items in the copy is not the most elegant way though.
Created attachment 243116 [details] [review] giscanner: remove unneeded encode('utf-8').decode('utf-8') roundtrip line is a unicode() instance, xml.sax.saxutils.escape() does nothing more than call a couple of replace() methods on said unicode() instance so it makes little sense to encode line into a str() and decode the escaped result back into a unicode().
Review of attachment 243113 [details] [review]: OK.
Review of attachment 243114 [details] [review]: This looks fine, but it will need to be rebased.
Review of attachment 243115 [details] [review]: Ok.
Review of attachment 243116 [details] [review]: Right.
https://git.gnome.org/browse/gobject-introspection/commit/?id=b70fe6a5649ed037f2554ae13067fd9929d841f8 https://git.gnome.org/browse/gobject-introspection/commit/?id=44ff0d355021f527a518d320f403aa0717fd0bc8 https://git.gnome.org/browse/gobject-introspection/commit/?id=0dbd46680a7fac7ac74c2945e23b95dd04ff79dc https://git.gnome.org/browse/gobject-introspection/commit/?id=bb482abafe4bc6d88cbbc4abc36967a3012e9f50
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]