GNOME Bugzilla – Bug 698367
Respect __GI_SCANNER__ for macros
Last modified: 2015-02-07 16:46:02 UTC
Sometimes headers have #define lines that are not namespaced for the current library. It should be possible to use this to suppress: #ifndef __GI_SCANNER__ ... #endif
Created attachment 241918 [details] [review] giscanner: Respect __GI_SCANNER__ when scanning for macros When scanning for macros respect ifdefs of __GI_SCANNER__ in the various header files. Only #ifdef and #ifndef are supported. If __GI_SCANNER__ appears in plain #if statements, a warning is printed.
Patch tested on master and gnome-3-6. Also applies to gnome-3-8.
Created attachment 241929 [details] [review] giscanner: Respect __GI_SCANNER__ when scanning for macros When scanning for macros respect ifdefs of __GI_SCANNER__ in the various header files. Only #ifdef and #ifndef are supported. If __GI_SCANNER__ appears in plain #if statements, a warning is printed.
Created attachment 257730 [details] [review] giscanner: Respect __GI_SCANNER__ when scanning for macros When scanning for macros respect ifdefs of __GI_SCANNER__ in the various header files. Only #ifdef and #ifndef are supported. If __GI_SCANNER__ appears in plain #if statements, a warning is printed.
Rebased onto master.
Created attachment 257773 [details] [review] giscanner: Respect __GI_SCANNER__ when scanning for macros Added tests, refactored for simpler implementation.
Review of attachment 257773 [details] [review]: This looks good. I assume you got my original review comment, even though bugzilla appears to have lost it after the outage. Just for posterity, the original comment was: "This looks clean and is well written. I assume it's been tested on a codebase of yours? But i'm a little worried at having no tests in g-i itself. If you think it's been tested enough outside I'm fine with applying, but I'd also be happy to have tests =)" Looks like all comments are addressed now, thank you!
Attachment 257773 [details] pushed as 917da2d - giscanner: Respect __GI_SCANNER__ when scanning for macros
Thanks for the review. Pushed. Oddly enough I didn't receive your previous comment.
Created attachment 258801 [details] [review] giscanner: Respect __GI_SCANNER__ when scanning for macros Patch for gnome-3-8 branch
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]