[Geany-devel] GObject: Use ->priv instead GET_PRIV() macros - Re: SF.net SVN: geany: trunk
nick.treleaven at xxxxx
Thu Apr 1 16:45:14 UTC 2010
On Tue, 30 Mar 2010 23:25:56 +0200
Enrico Tröger <enrico.troeger at uvena.de> wrote:
> >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.
> >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).
I think it's best not to generate that macro. GObject code is scary
enough already IMO :-p
More information about the Devel