[babl/unitybuild: 5/7] Move global static to c files



commit c88992f096e199f7023aa66a2a3d4b5b8ac1e151
Author: Félix Piédallu <felix piedallu me>
Date:   Tue Feb 27 15:23:43 2018 +0100

    Move global static to c files

 babl/babl-component.c  |    3 ++-
 babl/babl-conversion.c |    3 ++-
 babl/babl-db.h         |    4 ----
 babl/babl-extension.c  |    3 ++-
 babl/babl-fish.c       |    2 +-
 babl/babl-format.c     |    2 +-
 babl/babl-model.c      |    3 ++-
 babl/babl-type.c       |    3 ++-
 8 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/babl/babl-component.c b/babl/babl-component.c
index c3b617e..cc429ef 100644
--- a/babl/babl-component.c
+++ b/babl/babl-component.c
@@ -17,13 +17,14 @@
  */
 
 #include "config.h"
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include <string.h>
 
 #include <stdarg.h>
 
+static BablDb *db = NULL;
+
 static Babl *
 component_new (const char *name,
                int         id,
diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c
index 6873515..f7c2977 100644
--- a/babl/babl-conversion.c
+++ b/babl/babl-conversion.c
@@ -21,11 +21,12 @@
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include "babl-ref-pixels.h"
 
+static BablDb *db = NULL;
+
 static int model_is_rgba (const Babl *model)
 {
   const Babl *RGBA = babl_model_from_id (BABL_RGBA);
diff --git a/babl/babl-db.h b/babl/babl-db.h
index d576e6c..84bd4cc 100644
--- a/babl/babl-db.h
+++ b/babl/babl-db.h
@@ -38,10 +38,6 @@ typedef struct _BablDb
   BablMutex     *mutex;
 } _BablDb;
 
-#ifdef NEEDS_BABL_DB
-static BablDb *db = NULL;
-#endif /* NEEDS_BABL_DB */
-
 BablDb *
 babl_db_init (void);
 
diff --git a/babl/babl-extension.c b/babl/babl-extension.c
index 8e85be5..b2b8893 100644
--- a/babl/babl-extension.c
+++ b/babl/babl-extension.c
@@ -27,7 +27,6 @@
 #define BABL_INIT_HOOK    init_hook (); dynamic_init_hook ();
 #endif
 
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include "babl-base.h"
@@ -36,6 +35,8 @@
 
 static Babl *babl_extension_current_extender = NULL;
 
+static BablDb *db = NULL;
+
 Babl *
 babl_extender (void)
 {
diff --git a/babl/babl-fish.c b/babl/babl-fish.c
index 8c73a2b..c770e2e 100644
--- a/babl/babl-fish.c
+++ b/babl/babl-fish.c
@@ -17,7 +17,6 @@
  */
 
 #include "config.h"
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include <stddef.h>
@@ -36,6 +35,7 @@ typedef struct _BablFindFish
   const Babl *destination;
 } _BablFishFish;
 
+static BablDb *db = NULL;
 
 static int
 match_conversion (Babl *conversion,
diff --git a/babl/babl-format.c b/babl/babl-format.c
index 8963706..445f883 100644
--- a/babl/babl-format.c
+++ b/babl/babl-format.c
@@ -21,11 +21,11 @@
 #include <stdarg.h>
 #include <math.h>
 
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include "babl-ref-pixels.h"
 
+static BablDb *db = NULL;
 
 static int babl_format_destruct (void *babl)
 {
diff --git a/babl/babl-model.c b/babl/babl-model.c
index 7c1ca16..b831651 100644
--- a/babl/babl-model.c
+++ b/babl/babl-model.c
@@ -20,13 +20,14 @@
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include "babl-ref-pixels.h"
 
 static const Babl *construct_double_format (const Babl *model);
 
+static BablDb *db = NULL;
+
 static int
 babl_model_destroy (void *data)
 {
diff --git a/babl/babl-type.c b/babl/babl-type.c
index 91d9510..bcff670 100644
--- a/babl/babl-type.c
+++ b/babl/babl-type.c
@@ -21,11 +21,12 @@
 #include <stdarg.h>
 #include <math.h>
 
-#define NEEDS_BABL_DB
 #include "babl-internal.h"
 #include "babl-db.h"
 #include "babl-ref-pixels.h"
 
+static BablDb *db = NULL;
+
 static int
 babl_type_destroy (void *data)
 {


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