Re: libnm-glib 0.9 depends on glib 2.28 now



On Sat, 2012-02-04 at 10:10 +0100, Thomas Bechtold wrote:
> Hi,
> 
> i tried to build NM 0.9 with glib 2.24 but got the following errors:
> 
> nm-object.c: In function 'init_async_got_properties':
> nm-object.c:160: error: implicit declaration of function
> 'g_simple_async_result_take_error'
> nm-object.c: In function 'object_created':
> nm-object.c:605: error: implicit declaration of function
> 'g_clear_object'
> 
> 
> 'g_simple_async_result_take_error' was introduced with commit 9fd98ef9
> 'g_clear_object' was introduced with commit cc90f101
> 
> 
> Was this intended?

I think so; it's only two functions so we can work around it if
necessary.  glib 2.28 was released Feb 8th, 2011 so it's almost exactly
a year old.  NM 0.9 itself was released a few months later, so at least
glib 2.28 predates NM 0.9.

But in any case, g_clear_object() can be replaced with:

g_object_unref (*object);
*object = NULL;

and it appears that g_simple_async_result_take_error() can be replaced
with g_simple_async_result_set_from_error ().    If we do this I'd
prefer to implement g_clear_error() as an inline static compat function
in include/nm-glib-compat.h so we can keep the actual code clean for new
glibs.

Dan



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