[GSoC] GObjectification Summary

Mark Doliner mark at kingant.net
Wed Nov 27 01:09:00 EST 2013


On Mon, Nov 18, 2013 at 11:59 PM, Tomasz Wasilczyk <twasilczyk at pidgin.im> wrote:
> 2013/11/19 Ankit Vani <a at nevitus.org>
>>
>> On Tue, Nov 19, 2013 at 12:27 PM, Tomasz Wasilczyk <twasilczyk at pidgin.im>
>> wrote:
>> > I'm not sure, if its revelant, but you can always use preprocessor
>> > directives to write code both for currently required version and never
>> > ones.
>> > You can even write your implementation of newer functions and put it
>> > into
>> > glibcompat.h file.
>>
>> That would definitely work. I'll have to add this to glibcompat.h:
>>
>>  #if !GLIB_CHECK_VERSION(2, 26, 0)
>>
>>  static inline void g_object_notify_by_pspec(GObject *object, GParamSpec
>> *pspec)
>>  {
>>   g_object_notify(object, g_param_spec_get_name(pspec));
>>  }
>>
>>  #endif /* < 2.26.0 */
>>
>> However, I noticed this file is used sparingly at the moment. Is it okay
>> to use
>> it in every file that provides GObjects, even if they don't use anything
>> else
>> from the header?
>
> It's pretty new, so it's not used widely yet. Feel free to use it where you
> need it,

+1

> as soon as it's not included in externally visible headers.

I think Tomasz intended to say "as _long_ as it's not included in
externally visible headers."



More information about the Devel mailing list