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 621911 - [gi] don't redefine special methods on every prototype; use inheritance
[gi] don't redefine special methods on every prototype; use inheritance
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-17 17:19 UTC by Dan Winship
Modified: 2010-06-17 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[gi] don't redefine special methods on every prototype; use inheritance (1.59 KB, patch)
2010-06-17 17:19 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-06-17 17:19:08 UTC
Instead of defining "connect", "toString", etc, on each class
prototype, only define them on the GLib.Object prototype, and let
everything else just inherit them. (This makes it easier to override
one of them (eg, toString) on a hierarchy of subclasses.)
Comment 1 Dan Winship 2010-06-17 17:19:10 UTC
Created attachment 163940 [details] [review]
[gi] don't redefine special methods on every prototype; use inheritance
Comment 2 Johan (not receiving bugmail) Dahlin 2010-06-17 17:24:51 UTC
Review of attachment 163940 [details] [review]:

This looks in general good, I'd prefer adding tests, but I think the current testsuite already
tests this behavior pretty well, so as long as you've tried running the tests it should be fine to commit this.
Comment 3 Johan (not receiving bugmail) Dahlin 2010-06-17 17:24:51 UTC
Review of attachment 163940 [details] [review]:

This looks in general good, I'd prefer adding tests, but I think the current testsuite already
tests this behavior pretty well, so as long as you've tried running the tests it should be fine to commit this.
Comment 4 Dan Winship 2010-06-17 18:05:08 UTC
the regression tests fail for me with or without this patch, but
gnome-shell works fine with it

Attachment 163940 [details] pushed as c2303db - [gi] don't redefine special methods on every prototype; use inheritance