[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Re: gtk_check_version() confusion
From:       Victor_Aurélio_Santos <victoraur.santos () gmail ! com>
Date:       2015-08-10 0:45:54
Message-ID: CALixxdGsT79=v_muU+kMC9Vaf4hBKjKaGHB4Vf89-+fR-_jO_A () mail ! gmail ! com
[Download RAW message or body]

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@gmail.com>:
> 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@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic