[babl] babl.db: store git rev/version in header



commit d5ad1b906c0f286f2c932a87964c9896af5a1f09
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Nov 14 20:42:16 2016 +0100

    babl.db: store git rev/version in header

 babl/babl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/babl/babl.c b/babl/babl.c
index 2f63ac4..3199777 100644
--- a/babl/babl.c
+++ b/babl/babl.c
@@ -18,6 +18,7 @@
 
 #include "config.h"
 #include "babl-internal.h"
+#include "git-version.h"
 
 static int ref_count = 0;
 
@@ -184,8 +185,8 @@ static const char *fish_cache_path (void)
 
 static int compare_fish_pixels (const void *a, const void *b)
 {
-  const Babl **fa = a;
-  const Babl **fb = b;
+  const Babl **fa = (void*)a;
+  const Babl **fb = (void*)b;
   return ((*fb)->fish.pixels - (*fa)->fish.pixels) +
          ((*fb)->fish.processings - (*fa)->fish.processings);
 }
@@ -197,7 +198,7 @@ static void babl_store_db (void)
   FILE *dbfile = fopen (fish_cache_path (), "w");
   if (!dbfile)
     return;
-  fprintf (dbfile, "#babl 0 %i fishes\n", db->babl_list->count);
+  fprintf (dbfile, "#%s\n", BABL_GIT_VERSION);
 
   /* sort the list of fishes by usage, making next run more efficient -
    * and the data easier to approach as source of profiling


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