[clutter] Annotate the exported version variables



commit 38bcd86c51c42bd4f71ed5bbdb09345c2af4652c
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Feb 29 14:43:01 2012 +0000

    Annotate the exported version variables
    
    When using MSVC we need to annotate the variables that are going to be
    exported.

 clutter/clutter-version.h.in |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-version.h.in b/clutter/clutter-version.h.in
index befd040..fcddbd7 100644
--- a/clutter/clutter-version.h.in
+++ b/clutter/clutter-version.h.in
@@ -214,6 +214,21 @@ G_BEGIN_DECLS
          (CLUTTER_MAJOR_VERSION == (major) && CLUTTER_MINOR_VERSION > (minor)) || \
          (CLUTTER_MAJOR_VERSION == (major) && CLUTTER_MINOR_VERSION == (minor) && CLUTTER_MICRO_VERSION >= (micro)))
 
+/* annotation for exported variables
+ *
+ * XXX: this has to be defined here because clutter-macro.h imports this
+ * header file.
+ */
+#ifdef _MSC_VER
+# ifdef CLUTTER_COMPILATION
+#  define CLUTTER_VAR __declspec(dllexport)
+# else
+#  define CLUTTER_VAR extern __declspec(dllimport)
+# endif
+#else
+# define CLUTTER_VAR extern
+#endif
+
 /**
  * clutter_major_version:
  *
@@ -226,7 +241,7 @@ G_BEGIN_DECLS
  *
  * Since: 1.2
  */
-extern const guint clutter_major_version;
+CLUTTER_VAR const guint clutter_major_version;
 
 /**
  * clutter_minor_version:
@@ -240,7 +255,7 @@ extern const guint clutter_major_version;
  *
  * Since: 1.2
  */
-extern const guint clutter_minor_version;
+CLUTTER_VAR const guint clutter_minor_version;
 
 /**
  * clutter_micro_version:
@@ -254,7 +269,7 @@ extern const guint clutter_minor_version;
  *
  * Since: 1.2
  */
-extern const guint clutter_micro_version;
+CLUTTER_VAR const guint clutter_micro_version;
 
 gboolean clutter_check_version (guint major,
                                 guint minor,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]