From b4758c352607d1eede26d95056314de921b4e2b1 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 7 Oct 2012 22:04:21 +0100 Subject: [PATCH] 2.0: Fix up the versioning macros --- clutter/clutter-macros.h | 14 +++++++++----- clutter/clutter-version.h.in | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/clutter/clutter-macros.h b/clutter/clutter-macros.h index 3eb183074..c9df10fd6 100644 --- a/clutter/clutter-macros.h +++ b/clutter/clutter-macros.h @@ -78,7 +78,7 @@ * clutter.h header. * * The definition should be one of the predefined Clutter version macros, - * such as: %CLUTTER_VERSION_1_0, %CLUTTER_VERSION_1_2, ... + * such as: %CLUTTER_VERSION_2_0, %CLUTTER_VERSION_2_2, ... * * This macro defines the lower bound for the Clutter API to be used. * @@ -89,7 +89,11 @@ * */ #ifndef CLUTTER_VERSION_MIN_REQUIRED -# define CLUTTER_VERSION_MIN_REQUIRED (CLUTTER_VERSION_CUR_STABLE) +# if CLUTTER_MAJOR_VERSION < 2 +# define CLUTTER_VERSION_MIN_REQUIRED (G_ENCODE_VERSION (2, 0)) +# else +# define CLUTTER_VERSION_MIN_REQUIRED (CLUTTER_VERSION_CUR_STABLE) +# endif #endif /** @@ -99,7 +103,7 @@ * clutter.h header. * * The definition should be one of the predefined Clutter version macros, - * such as: %CLUTTER_VERSION_1_0, %CLUTTER_VERSION_1_2, ... + * such as: %CLUTTER_VERSION_2_0, %CLUTTER_VERSION_2_2, ... * * This macro defines the upper bound for the Clutter API to be used. * @@ -121,8 +125,8 @@ #if CLUTTER_VERSION_MAX_ALLOWED < CLUTTER_VERSION_MIN_REQUIRED # error "CLUTTER_VERSION_MAX_ALLOWED must be >= CLUTTER_VERSION_MIN_REQUIRED" #endif -#if CLUTTER_VERSION_MIN_REQUIRED < CLUTTER_VERSION_1_0 -# error "CLUTTER_VERSION_MIN_REQUIRED must be >= CLUTTER_VERSION_1_0" +#if CLUTTER_VERSION_MIN_REQUIRED < CLUTTER_VERSION_2_0 +# error "CLUTTER_VERSION_MIN_REQUIRED must be >= CLUTTER_VERSION_2_0" #endif /* XXX: Every new stable minor release should add a set of macros here */ diff --git a/clutter/clutter-version.h.in b/clutter/clutter-version.h.in index 5fb7d7927..d9b8c89d8 100644 --- a/clutter/clutter-version.h.in +++ b/clutter/clutter-version.h.in @@ -123,7 +123,7 @@ G_BEGIN_DECLS * A macro that evaluates to the 1.0 version of Clutter, in a format * that can be used by the C pre-processor. */ -#define CLUTTER_VERSION_1_0 (G_ENCODE_VERSION (1, 0)) +#define CLUTTER_VERSION_2_0 (G_ENCODE_VERSION (2, 0)) /* evaluates to the current stable version; for development cycles, * this means the next stable target