GObjectification - GSoC progress as of June 16, 2013
eion at robbmob.com
Wed Jun 19 07:07:03 EDT 2013
Not saying it's the best idea in the world but what works really well in
the steamworks api (the library that games use to connect to Steam) is
versioning all objects and using a Factory object to create specific
versions of each object. So there could be a PurpleBuddy base class or
interface and a PurpleBuddy3_1 object that contains the additional methods?
Not sure if that will help at all with this bug thought I'd throw it into
the mix anyway. :-)
On 19/06/2013 7:38 PM, "Nader Morshed" <morshed.nader at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Tue, 18 Jun 2013 23:22:33 -0400
> Ethan Blanton <elb at pidgin.im> wrote:
> > This has several implications, but they all basically boil down to the
> > fact that the *subclass* has to know the size of the parent class.
> > Having to know the size means it can't be hidden. Having to know the
> > size and maintaining linkage compatability means it can't change size.
> > So ... we're back where we started.
> > Any objects that should not be subclassed should have their
> > implementations hidden to the extent possible, of course.
> FWIW, there's G_SEAL to force callers to use the methods to access
> object properties: https://live.gnome.org/GnomeGoals/UseGseal
> Then you can either dummy pointers as padding for forward
> compatibility, but another possible option is to add a field that
> versions the structures and add conditional code to the getters /
> setters. The trade-off better future-proofing for bulkier code. The
> FreeBSD project discusses it in their standards for maintaining binary
> compatibility: https://wiki.freebsd.org/BinaryCompatibility
> I suspect the pidgin devs will probably speak against the latter point,
> but just thought I'd throw it in as my 2 cents...
> - --
> Nader Morshed <morshed.nader at gmail.com>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (MingW32)
> -----END PGP SIGNATURE-----
> Devel mailing list
> Devel at pidgin.im
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel