Re: gtk_check_version() confusion

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

 



Why do not you test ?

I'm running 3.16.5, with following code:
    const char *lower;
    const char *equal;
    const char *higher;

    lower = gtk_check_version(3, 16, 4);
    equal = gtk_check_version(3, 16, 5);
    higher = gtk_check_version(3, 16, 6);

    printf("The lower is: %s\n", lower);
    printf("The equal is: %s\n", equal);
    printf("The higher is: %s\n", higher);

the output is following:

The lower is: (null)
The equal is: (null)
The higher is: GTK+ version too old (micro mismatch)

so, as you can see:
(check version) <= running version returns null;
(check version) > running version returns error string;

2015-08-09 19:02 GMT-03:00 Igor Korot <ikorot01@xxxxxxxxx>:
> Hi, ALL,
> Documentation says:
>
> [quote]
>
> Returns
>
> NULL if the GTK+ library is compatible with the given version, or a
> string describing the version mismatch. The returned string is owned
> by GTK+ and should not be modified or freed.
> [/quote]
>
> So NULL is returned if my GTK+ version is >= than the supplied version
> to check for? And the string is returned if not?
>
> Let's say I have 3,12.5 and I want to check if I have >= 3.10.0.
>
> if( !gtk_check_version( 3, 10, 0 ) )
>
> will return true on my system, right? And if I have 3.5.x I will get a
> string of some sort.
>
> Thank you.
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> https://mail.gnome.org/mailman/listinfo/gtk-list



-- 
Victor Aurélio Santos
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux