[beast: 9/10] BSE: simplify BSE version handling



commit 88a9d82192f9a767fd0cabbfcce73b58abf471aa
Author: Tim Janik <timj gnu org>
Date:   Thu Jun 11 03:32:36 2015 +0200

    BSE: simplify BSE version handling

 beast-gtk/bstmain.cc |    4 ++--
 bse/bse.hh           |   12 ------------
 bse/bsemain.cc       |   20 --------------------
 bse/bsemain.hh       |    3 ---
 bse/bseplugin.hh     |    1 -
 shell/bsescm.cc      |    4 ++--
 6 files changed, 4 insertions(+), 40 deletions(-)
---
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index 034c74b..eec1c84 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -662,8 +662,8 @@ bst_exit_print_version (void)
   g_print ("BEAST version %s (%s)\n", BST_VERSION, BST_VERSION_HINT);
   g_print ("Libraries: ");
   g_print ("GLib %u.%u.%u", glib_major_version, glib_minor_version, glib_micro_version);
-  g_print (", SFI %u.%u.%u", bse_major_version, bse_minor_version, bse_micro_version);
-  g_print (", BSE %u.%u.%u", bse_major_version, bse_minor_version, bse_micro_version);
+  g_print (", SFI %s", BST_VERSION);
+  g_print (", BSE %s", BST_VERSION);
   c = bse_server_get_vorbis_version (BSE_SERVER);
   if (c)
     g_print (", %s", c);
diff --git a/bse/bse.hh b/bse/bse.hh
index b1d6f39..dd1a28f 100644
--- a/bse/bse.hh
+++ b/bse/bse.hh
@@ -5,16 +5,4 @@
 #include <bse/bsestartup.hh>
 #include <bse/bseclientapi.hh>
 
-G_BEGIN_DECLS
-
-/* library versioning */
-extern const guint   bse_major_version;
-extern const guint   bse_minor_version;
-extern const guint   bse_micro_version;
-extern const gchar  *bse_version;
-const char*          bse_check_version (guint           required_major,
-                                        guint           required_minor,
-                                        guint           required_micro);
-G_END_DECLS
-
 #endif /* __BSE_H__ */
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index 98a863f..3bc47ec 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -30,10 +30,6 @@ static void     init_aida_idl ();
 
 /* --- variables --- */
 /* from bse.hh */
-const uint              bse_major_version = BST_MAJOR_VERSION;
-const uint              bse_minor_version = BST_MINOR_VERSION;
-const uint              bse_micro_version = BST_MICRO_VERSION;
-const char             *bse_version = BST_VERSION;
 GMainContext            *bse_main_context = NULL;
 static volatile gboolean bse_initialization_stage = 0;
 static gboolean          textdomain_setup = FALSE;
@@ -107,22 +103,6 @@ _bse_init_async (int *argc, char **argv, const char *app_name, const Bse::String
   async_bse_thread.detach();    // FIXME: rather join on exit
 }
 
-const char*
-bse_check_version (uint required_major, uint required_minor, uint required_micro)
-{
-  if (required_major > BST_MAJOR_VERSION)
-    return "BSE version too old (major mismatch)";
-  if (required_major < BST_MAJOR_VERSION)
-    return "BSE version too new (major mismatch)";
-  if (required_minor > BST_MINOR_VERSION)
-    return "BSE version too old (minor mismatch)";
-  if (required_minor < BST_MINOR_VERSION)
-    return "BSE version too new (minor mismatch)";
-  if (required_micro > BST_MICRO_VERSION)
-    return "BSE version too old (micro mismatch)";
-  return NULL; // required_micro <= BST_MICRO_VERSION
-}
-
 struct AsyncData {
   const gchar *client;
   const std::function<void()> &caller_wakeup;
diff --git a/bse/bsemain.hh b/bse/bsemain.hh
index d40ef11..9afd542 100644
--- a/bse/bsemain.hh
+++ b/bse/bsemain.hh
@@ -8,9 +8,6 @@ G_BEGIN_DECLS
 void           bse_init_textdomain_only (void);
 void           _bse_init_async          (int *argc, char **argv, const char *app_name, const 
Bse::StringVector &args);
 SfiGlueContext* _bse_glue_context_create (const char *client, const std::function<void()> &caller_wakeup);
-const char*     bse_check_version      (guint           required_major,
-                                         guint          required_minor,
-                                         guint          required_micro);       // prototyped in bse.hh
 
 /* initialization for internal utilities */
 void bse_init_inprocess        (int *argc, char **argv, const char *app_name, const Bse::StringVector &args 
= Bse::StringVector());
diff --git a/bse/bseplugin.hh b/bse/bseplugin.hh
index abfa9cb..826d324 100644
--- a/bse/bseplugin.hh
+++ b/bse/bseplugin.hh
@@ -2,7 +2,6 @@
 #ifndef __BSE_PLUGIN_H__
 #define __BSE_PLUGIN_H__
 
-#include       <bse/bsestartup.hh>     // for bse_check_version()
 #include       <bse/bseexports.hh>
 
 G_BEGIN_DECLS
diff --git a/shell/bsescm.cc b/shell/bsescm.cc
index f660803..3710851 100644
--- a/shell/bsescm.cc
+++ b/shell/bsescm.cc
@@ -268,8 +268,8 @@ shell_parse_args (int *argc_p, char **argv)
           g_print ("BSESCM version %s (%s)\n", BST_VERSION, BST_VERSION_HINT);
           g_print ("Libraries: ");
           g_print ("GLib %u.%u.%u", glib_major_version, glib_minor_version, glib_micro_version);
-          g_print (", SFI %u.%u.%u", bse_major_version, bse_minor_version, bse_micro_version);
-          g_print (", BSE %u.%u.%u", bse_major_version, bse_minor_version, bse_micro_version);
+          g_print (", SFI %s", BST_VERSION);
+          g_print (", BSE %s", BST_VERSION);
           g_print (", Guile %u.%u.%u", SCM_MAJOR_VERSION, SCM_MINOR_VERSION, SCM_MICRO_VERSION);
           g_print ("\n");
           g_print ("Compiled for: %s\n", BST_ARCH_NAME);


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