Libbson Versioning

Versioning Macros and Functions

Synopsis

#define BSON_CHECK_VERSION(major, minor, micro)

#define BSON_MAJOR_VERSION 1
#define BSON_MINOR_VERSION 1
#define BSON_MICRO_VERSION 2
#define BSON_VERSION_S     "1.1.2"

#define BSON_VERSION_HEX (BSON_MAJOR_VERSION << 24 | \
                          BSON_MINOR_VERSION << 16 | \
                          BSON_MICRO_VERSION << 8)

int bson_get_major_version (void);
int bson_get_minor_version (void);
int bson_get_micro_version (void);

Description

Libbson contains various compile time macros and runtime functions to help you determine what version of Libbson you are running on. This can be useful if you need to handle code fragments differently based on the Libbson version.