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 634153 - use c-symbol-prefix where possible for method pairing
use c-symbol-prefix where possible for method pairing
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 625942
 
 
Reported: 2010-11-06 09:51 UTC by Jonathan Matthew
Modified: 2015-02-07 16:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use target.c_symbol_prefix where possible (1.35 KB, patch)
2010-11-06 09:55 UTC, Jonathan Matthew
reviewed Details | Review
update expected Regress-1.0.gir (5.39 KB, patch)
2010-11-13 11:53 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2010-11-06 09:51:13 UTC
Currently, for method pairing to work, the method names have to start with the value returned by utils.to_underscores_noprefix(name).lower(), but the more capital letters in the type name, the less likely it is that the names will match.

For example, in rhythmbox, we have "RBMetaData" as a type, and methods on it are named "rb_metadata_*", but utils.to_underscores_prefix("MetaData") returns "meta_data", so none of the methods get paired.  There are a few other similar cases too.

In each case in rhythmbox, the method prefixes match that of the _get_type function, so checking that instead (or in addition?) to the result of to_underscores_prefix() seems like a good idea.
Comment 1 Jonathan Matthew 2010-11-06 09:55:17 UTC
Created attachment 173938 [details] [review]
use target.c_symbol_prefix where possible

This makes me about 300% happier with the generated introspection data for rhythmbox.
Comment 2 Colin Walters 2010-11-09 16:16:05 UTC
Review of attachment 173938 [details] [review]:

Makes sense; can you add a regression test?
Comment 3 Jonathan Matthew 2010-11-13 11:50:13 UTC
There's one there already, actually - regress_test_wi_802_1x_{get,set}_testbool are currently represented as static methods in Regress-1.0-expected.gir when they should really be instance methods.
Comment 4 Jonathan Matthew 2010-11-13 11:53:03 UTC
Created attachment 174383 [details] [review]
update expected Regress-1.0.gir

Not sure what's going on with test_unichar here.. was it added in the wrong place?
Comment 5 Colin Walters 2010-11-15 19:31:26 UTC
Review of attachment 174383 [details] [review]:

Please commit, thanks!
Comment 6 Jonathan Matthew 2010-11-16 00:42:08 UTC
pushed as commit 52d0020.
Comment 7 André Klapper 2015-02-07 16:57:38 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]