[Geany-devel] GObject: Use ->priv instead GET_PRIV() macros - Re: SF.net SVN: geany:[4791] trunk

Enrico Tröger enrico.troeger at xxxxx
Tue Mar 30 21:25:56 UTC 2010


On Tue, 30 Mar 2010 18:24:38 +0100, Nick wrote:

>Hi,
>
>I randomly saw this:
>http://blogs.gnome.org/jjardon/2010/03/30/improve-performance-use-priv-instead-get_priv-macros/

Sweet.


>For our uses I'm not sure if it affects performance much, but it would
>be good to remove all FOO_GET_PRIVATE() macros from GObject code.

Yes.


>I removed this macro generation from the Class Builder plugin.

Maybe we could do what Alberto said: keep the FOO_GET_PRIVATE() macros
but change them so they use the cached private field. This has the
advantage that for existing code you don't need to change so much code.
Of course, the changes in Geany's GObject classes aren't that many and
for the Class Builder plugin it also doesn't really affect because it
is used for *new* code :). But still, I think many GObject developers
are kinda used to use FOO_GET_PRIVATE()  (including me).


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100330/62ab55c0/attachment.pgp>


More information about the Devel mailing list