Re: Programming style



hi,

Wallace Owen wrote:
On Mon, 2005-10-24 at 17:21 -0400, Tristan Van Berkom wrote:

...
I just wanted to point out that the user data argument is usable and
efficient (since nobody had mentioned that yet).

Ofcourse there are cases where it isn't convenient to use the user_data;
I might as well also note that, with the cost of a slight overhead;
g_object_set_data (); is often usefull for this type of inconvenience.


gtk_object_set_user_data() is deprecated, so we're left with
tristan mentioned g_object_set_data()
g_object_set_data(), which will involve a string lookup.
and if the string lookup is concerning you there is g_object_set_qdata() where you pre-allocate the GQuark from the string and use that.

Stefan



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