Version Information

Version Information — Variables and functions to check Cattle's version

Synopsis

#include <cattle/cattle.h>

#define             CATTLE_MAJOR_VERSION
#define             CATTLE_MINOR_VERSION
#define             CATTLE_MICRO_VERSION
#define             CATTLE_CHECK_VERSION                (major,
                                                         minor,
                                                         micro)
extern              const guint cattle_major_version;
extern              const guint cattle_minor_version;
extern              const guint cattle_micro_version;
gboolean            cattle_check_version                (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

Description

The following variables, functions and macros allow one to check both the version of Cattle being used for compilation and the one used at runtime.

Cattle follows the MAJOR.MINOR.MICRO versioning scheme, where all releases sharing the same major number are ABI compatible and releases with and odd minor number are unstable releases targeted at developers only.

Details

CATTLE_MAJOR_VERSION

#define CATTLE_MAJOR_VERSION (1)

Major version of the Cattle library used for compilation.


CATTLE_MINOR_VERSION

#define CATTLE_MINOR_VERSION (0)

Minor version of the Cattle library used for compilation.


CATTLE_MICRO_VERSION

#define CATTLE_MICRO_VERSION (1)

Micro version of the Cattle library used for compilation.


CATTLE_CHECK_VERSION()

#define             CATTLE_CHECK_VERSION(major,minor,micro)

Check the Cattle library used for compilation is compatible with the required version described by major, minor and micro.

major :

required major version

minor :

required minor version

micro :

required micro version

Returns :

TRUE if the library used for compilation is compatible, FALSE otherwise

cattle_major_version

extern const guint cattle_major_version;

Major version of the Cattle library used at runtime.


cattle_minor_version

extern const guint cattle_minor_version;

Minor version of the Cattle library used at runtime.


cattle_micro_version

extern const guint cattle_micro_version;

Micro version of the Cattle library used at runtime.


cattle_check_version ()

gboolean            cattle_check_version                (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

Check the Cattle library used at runtime is compatible with the required version described by required_major, required_minor and required_micro.

required_major :

required major version

required_minor :

required minor version

required_micro :

required micro version

Returns :

TRUE if the runtime library is compatible, FALSE otherwise