Re: gtk_check_version() confusion
- Date: Sun, 9 Aug 2015 21:45:54 -0300
- From: Victor Aurélio Santos <victoraur.santos@xxxxxxxxx>
- Subject: Re: gtk_check_version() confusion
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:
> 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.
> 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
Victor Aurélio Santos
gtk-list mailing list