G_GNUC_HIDDEN, G_GNUC_DEPRECATED



A suggestion from Alex Larsson is that we add a 
G_GNUC wrapper for GCC's __attribute__ (( visibility ("hidden"))).

See http://people.redhat.com/drepper/dsohowto.pdf for why
this can be useful from a performance point of view.

(It doesn't matter much for us, since few of our _gtk functions
are hot spots, but some users of GLib.)

Since apparently "internal" and "protected" aren't really
useful G_GNUC_HIDDEN may be a better name than 
G_GNUC_VISIBILITY ("hidden").

Another attribute suggestion is from Tom Tromey - 
http://bugzilla.gnome.org/show_bug.cgi?id=87979 which
suggests adding G_GNUC_DEPRECATED as a wrapper for
__attribute__ ((deprecated)).

Again we probably wouldn't get much benefit from this,
since we already have a more portable and easier to apply
(but somewhat inferior) deprecation system in place,
but other users of GLib might appreciate these.

Do people think these would be good ideas? they are easy 
enough to add.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]