From 05fd3e701b50364dd032d3fff2b1a607e2c6f239 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 20 Jun 2014 19:21:18 +0200 Subject: client API: declare as stable It is reasonably stable, so all further changes will be versioned. Also change how the libmpv version number is generated. Fix the patch version number to 0; I don't think we have a use for this. In particular, the version doesn't version mpv, just the client API. --- libmpv/client.h | 16 ++++++---------- wscript_build.py | 4 +--- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/libmpv/client.h b/libmpv/client.h index 0f2a455ae3..b2b48f390f 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -30,11 +30,6 @@ extern "C" { #endif -/** - * Warning: this API is still work in progress. This notice will be removed - * once the API is considered reasonably stable. - */ - /** * Mechanisms provided by this API * ------------------------------- @@ -139,12 +134,13 @@ extern "C" { */ /** - * The version is incremented on each change. The 16 lower bits are incremented - * if something in mpv is changed that might affect the client API, but doesn't - * change C API itself (like the removal of an option or a property). The higher - * 16 bits are incremented if the C API itself changes. + * The version is incremented on each API change. The 16 lower bits form the + * minor version number, and the 16 higher bits the major version number. If + * the API becomes incompatible to previous versions, the major version + * number is incremented. This affects only C part, and not properties and + * options. */ -#define MPV_CLIENT_API_VERSION 0x00000000UL +#define MPV_CLIENT_API_VERSION 0x00010000UL /** * Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with. diff --git a/wscript_build.py b/wscript_build.py index 33e68589a5..88c836e278 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -448,9 +448,7 @@ def build(ctx): ctx.path.find_node("libmpv/client.h").read(), re.M) .group(1), 16) - libversion = (str(vnum >> 24) + '.' + - str((vnum >> 16) & 0xff) + '.' + - str(vnum & 0xffff)) + libversion = str(vnum >> 16) + '.' + str(vnum & 0xffff) + '.0' def _build_libmpv(shared): features = "c " -- cgit v1.2.3