gwyversion — Version information
gint | gwy_version_major () |
gint | gwy_version_minor () |
const gchar * | gwy_version_string () |
#define | GWY_VERSION_MAJOR |
#define | GWY_VERSION_MINOR |
#define | GWY_VERSION_STRING |
#include <libgwyddion/gwyddion.h>
Macros like GWY_VERSION_MAJOR
can be used for compile-time version checks,
that is they tell what version a module or app is being compiled or was
compiled with.
On the other hand functions like gwy_version_major()
can be used to run-time
version checks and they tell what version a module or app was linked or
is running with.
gint
gwy_version_major (void
);
Gets the major version of Gwyddion.
If the version is 1.99.7.20060604, this function returns 1.
The major version.
gint
gwy_version_minor (void
);
Gets the minor version of Gwyddion.
If the version is 1.99.7.20060604, this function returns 99.
The minor version.
const gchar *
gwy_version_string (void
);
Gets the full Gwyddion version as a string.
If the version is 1.99.7.20060604, this function returns
"1.99.7.20060604"
.
This is the only method to get finer version information than major.minor. However, only development versions use finer versioning than major.minor therefore a module or app requiring such information is probably broken anyway. A meaningful use is to advertise the version of Gwyddion your app runs with.
The full version as a constant string.
#define GWY_VERSION_MAJOR 2
Expands to the major version of Gwyddion as a number.
If the version is 1.99.7.20060604, this macro is defined as 1.
#define GWY_VERSION_MINOR 67
Expands to the minor version of Gwyddion as a number.
If the version is 1.99.7.20060604, this macro is defined as 99.
#define GWY_VERSION_STRING "2.67"
Expands to the full Gwyddion version as a string.
If the version is 1.99.7.20060604, this macro is defined as
"1.99.7.20060604"
.
See gwy_version_string()
for caveats.