diff options
author | wm4 <wm4@nowhere> | 2014-08-05 02:23:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-05 02:23:14 +0200 |
commit | 43ddf2099baf01ae22985f60e0f735a00f578844 (patch) | |
tree | 6d9fc6e5660c382e618852f4a21650d357f397a7 /libmpv/client.h | |
parent | bdf607ea5f218b1aa60dff9abc94b68e1a934368 (diff) | |
download | mpv-43ddf2099baf01ae22985f60e0f735a00f578844.tar.bz2 mpv-43ddf2099baf01ae22985f60e0f735a00f578844.tar.xz |
client API: add and use the MPV_MAKE_VERSION macro
This is probably nicer. The actual version number doesn't change (other
than the minor being incremented).
The "| 0UL" is to make the type unsigned long int, like it was before.
Diffstat (limited to 'libmpv/client.h')
-rw-r--r-- | libmpv/client.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libmpv/client.h b/libmpv/client.h index 687611c5e7..4a653963eb 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -158,12 +158,11 @@ extern "C" { * number is incremented. This affects only C part, and not properties and * options. * - * The version number is often converted into a human readable form by writing - * the major and minor version number in decimal. E.g.: - * version 0x001001FF - * becomes 16.511 (dec(0x0010) + "." + dec(0x01FF)) + * You can use MPV_MAKE_VERSION() and compare the result with integer + * relational operators (<, >, <=, >=). */ -#define MPV_CLIENT_API_VERSION 0x00010002UL +#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL) +#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 3) /** * Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with. |