After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670673 - scanner: Also use node.name to lookup error enums
scanner: Also use node.name to lookup error enums
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
: 656506 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-02-23 11:47 UTC by Jens Georg
Modified: 2015-02-07 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanner: Also use node.name to lookup error enums (2.26 KB, patch)
2012-02-23 11:47 UTC, Jens Georg
needs-work Details | Review
scanner: Also use node.name to lookup error enums (9.69 KB, patch)
2012-02-23 13:17 UTC, Jens Georg
none Details | Review
scanner: Also use node.name to lookup error enums (9.71 KB, patch)
2012-04-30 08:22 UTC, Abderrahim Kitouni
none Details | Review

Description Jens Georg 2012-02-23 11:47:13 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.
Comment 1 Jens Georg 2012-02-23 11:47:15 UTC
Created attachment 208247 [details] [review]
scanner: Also use node.name to lookup error enums
Comment 2 Jens Georg 2012-02-23 13:17:23 UTC
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.
Comment 3 Dan Winship 2012-02-23 13:19:24 UTC
*** Bug 656506 has been marked as a duplicate of this bug. ***
Comment 4 Dan Winship 2012-02-23 13:21:33 UTC
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).
Comment 5 Dan Winship 2012-02-23 13:23:11 UTC
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.]
Comment 6 Jens Georg 2012-02-23 13:29:51 UTC
Oops, my Bugzilla-fu failed me in finding 656506.
Comment 7 Johan (not receiving bugmail) Dahlin 2012-04-09 15:07:49 UTC
This needs an updated patch as it does not apply to git any longer
Comment 8 Abderrahim Kitouni 2012-04-30 08:22:43 UTC
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.
Comment 9 Abderrahim Kitouni 2012-04-30 08:24:38 UTC
(forgot to mention: this is just Jens's patch rebased to master)
Comment 10 Abderrahim Kitouni 2012-07-25 17:47:52 UTC
This seems to have been fixed as part of bug 669350
Comment 11 Jens Georg 2012-08-18 12:27:31 UTC
seems to work for me as well.
Comment 12 Colin Walters 2012-08-25 20:09:46 UTC
Thanks, closing per comment #11
Comment 13 André Klapper 2015-02-07 16:50:32 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]