Re: [libvirt-glib 1/2] Fix glib version check for g_type_init

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

 



On 14.11.2012 15:16, Christophe Fergeau wrote:
> g_type_init has been deprecated in glib 2.35, not 2.34. With versions
> older than 2.35, we have to call it or we'll get a runtime failure.
> ---
>  libvirt-gconfig/libvirt-gconfig-compat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-compat.h b/libvirt-gconfig/libvirt-gconfig-compat.h
> index 85a420d..3719896 100644
> --- a/libvirt-gconfig/libvirt-gconfig-compat.h
> +++ b/libvirt-gconfig/libvirt-gconfig-compat.h
> @@ -25,7 +25,7 @@
>  
>  #include <glib-object.h>
>  
> -#if GLIB_CHECK_VERSION(2, 34, 0)
> +#if GLIB_CHECK_VERSION(2, 35, 0)
>  #define g_type_init()
>  #endif
>  
> 

Wasn't it deprecated in 2.36? From [1]:

  g_type_init has been deprecated since version 2.36 ...

So I think this chunk should be:

 -#if GLIB_CHECK_VERSION(2, 34, 0)
 +#if GLIB_CHECK_VERSION(2, 36, 0)

Moreover, this is just a compile time check. Don't we want a runtime
one? That is glib_check_version().

Michal

1:
http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]