GNOME Bugzilla – Bug 670673
scanner: Also use node.name to lookup error enums
Last modified: 2015-02-07 16:50:32 UTC
Namespace._uscore_type_names is a mapping from symbol names without the identifier prefix while symbol.name still has that prefix so it was never used to match enums. This usually doesn't matter since it will just work with the fallback array, but with libraries that don't follow the usual CamelCase rules the fall-back also fails and g-i doesn't find the proper error enum. By also using node.name in addition to node.symbol this is fixed.
Created attachment 208247 [details] [review] scanner: Also use node.name to lookup error enums
Created attachment 208263 [details] [review] scanner: Also use node.name to lookup error enums Namespace._uscore_type_names is a mapping from symbol names without the identifier prefix while symbol.name still has that prefix so it was never used to match enums. This usually doesn't matter since it will just work with the fallback array, but with libraries that don't follow the usual CamelCase rules the fall-back also fails and g-i doesn't find the proper error enum. By also using node.name in addition to node.symbol this is fixed. Adds testcase.
*** Bug 656506 has been marked as a duplicate of this bug. ***
Comment on attachment 208247 [details] [review] scanner: Also use node.name to lookup error enums needs tests (you can steal the one from 656506 and just merge it into g-i's existing tests).
oops :) [not reviewing the updated patch because i'm not a g-i maintainer. I just knew that the original patch wasn't going to get accepted without a test case anyway.]
Oops, my Bugzilla-fu failed me in finding 656506.
This needs an updated patch as it does not apply to git any longer
Created attachment 213081 [details] [review] scanner: Also use node.name to lookup error enums Namespace._uscore_type_names is a mapping from symbol names without the identifier prefix while symbol.name still has that prefix so it was never used to match enums. This usually doesn't matter since it will just work with the fallback array, but with libraries that don't follow the usual CamelCase rules the fall-back also fails and g-i doesn't find the proper error enum. By also using node.name in addition to node.symbol this is fixed.
(forgot to mention: this is just Jens's patch rebased to master)
This seems to have been fixed as part of bug 669350
seems to work for me as well.
Thanks, closing per comment #11
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]