[beast/devel: 68/77] SFI: get rid of Birnet uses



commit 100414189219871394da8f60b622412870d546f3
Author: Tim Janik <timj gnu org>
Date:   Sun Apr 14 19:52:36 2013 +0200

    SFI: get rid of Birnet uses

 sfi/sficxx.cc      |   17 +++++++++++++++++
 sfi/sficxx.hh      |    1 -
 sfi/sfidl-utils.hh |    7 +++++--
 sfi/sfitests.hh    |    2 +-
 sfi/sfiwrapper.cc  |   14 +++++++-------
 sfi/sfiwrapper.hh  |   40 +++++++++++++---------------------------
 6 files changed, 43 insertions(+), 38 deletions(-)
---
diff --git a/sfi/sficxx.cc b/sfi/sficxx.cc
new file mode 100644
index 0000000..b7b0a44
--- /dev/null
+++ b/sfi/sficxx.cc
@@ -0,0 +1,17 @@
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#include "sficxx.hh"
+#include "sfi.hh"
+namespace Sfi {
+static void
+sfi_init_cxx (void)
+{
+  g_type_init ();       /* just in case this hasn't been called already */
+  _sfi_init_values ();
+  _sfi_init_params ();
+  _sfi_init_time ();
+  _sfi_init_glue ();
+  _sfi_init_file_crawler ();
+}
+static Birnet::InitHook sfi_init_hook (sfi_init_cxx);
+} // Sfi
+/* vim:set ts=8 sts=2 sw=2: */
diff --git a/sfi/sficxx.hh b/sfi/sficxx.hh
index 38bc348..d007ced 100644
--- a/sfi/sficxx.hh
+++ b/sfi/sficxx.hh
@@ -1,7 +1,6 @@
 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
 #ifndef __SFI_CXX_H__
 #define __SFI_CXX_H__
-#include <birnet/birnet.hh>
 #include <sfi/sfi.hh>
 #include <string>
 #include <string.h>
diff --git a/sfi/sfidl-utils.hh b/sfi/sfidl-utils.hh
index 552cd21..1624d65 100644
--- a/sfi/sfidl-utils.hh
+++ b/sfi/sfidl-utils.hh
@@ -2,17 +2,20 @@
 #ifndef _SFIDL_UTILS_HH_
 #define _SFIDL_UTILS_HH_
 #include <sfi/glib-extra.hh>
-#include <birnet/birnet.hh>
+#include <sfi/sfi.hh>
 #include <list>
 #include <vector>
 
 /// The Sfidl namespace contains implementation and API of the Sfi IDL compiler.
 namespace Sfidl {
+
 /* lots of helpers like string_from_int, but also typedefs like String */
-using namespace Birnet;
+using namespace Rapicorn;
+
 /* common data structures */
 using std::list;
 using std::vector;
+
 } // Sfidl
 
 #endif /* _SFIDL_UTILS_HH_ */
diff --git a/sfi/sfitests.hh b/sfi/sfitests.hh
index 24a135e..8fc8cd9 100644
--- a/sfi/sfitests.hh
+++ b/sfi/sfitests.hh
@@ -5,7 +5,7 @@
 #include <sfi/sfi.hh>
 #include <rapicorn-test.hh>
 
-static void BIRNET_UNUSED
+static void RAPICORN_UNUSED
 sfi_init_test (int *argcp, char **argv)
 {
   sfi_init (argcp, argv, RAPICORN_PRETTY_FILE, Bse::cstrings_to_vector ("rapicorn-test-initialization=1", 
NULL));
diff --git a/sfi/sfiwrapper.cc b/sfi/sfiwrapper.cc
index acc8c0f..747c7ef 100644
--- a/sfi/sfiwrapper.cc
+++ b/sfi/sfiwrapper.cc
@@ -1,7 +1,7 @@
 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
 #include "sfiwrapper.hh"
 #include "sficxx.hh"
-#include <birnet/birnet.hh>
+#include <sfi/sfi.hh>
 #include <rapicorn-test.hh>
 #include <errno.h>
 
@@ -71,37 +71,37 @@ bool
 birnet_file_check (const char *file,
                    const char *mode)
 {
-  return Birnet::Path::check (file ? file : "", mode ? mode : "");
+  return Rapicorn::Path::check (file ? file : "", mode ? mode : "");
 }
 bool
 birnet_file_equals (const char *file1,
                     const char *file2)
 {
-  return Birnet::Path::equals (file1 ? file1 : "", file2 ? file2 : "");
+  return Rapicorn::Path::equals (file1 ? file1 : "", file2 ? file2 : "");
 }
 
 /* --- url handling --- */
 void
 sfi_url_show (const char *url)
 {
-  return Birnet::url_show (url);
+  return Rapicorn::url_show (url);
 }
 void
 sfi_url_show_with_cookie (const char *url,
                           const char *url_title,
                           const char *cookie)
 {
-  return Birnet::url_show_with_cookie (url, url_title, cookie);
+  return Rapicorn::url_show_with_cookie (url, url_title, cookie);
 }
 bool
 sfi_url_test_show (const char *url)
 {
-  return Birnet::url_test_show (url);
+  return Rapicorn::url_test_show (url);
 }
 bool
 sfi_url_test_show_with_cookie (const char *url,
                                const char *url_title,
                                const char *cookie)
 {
-  return Birnet::url_test_show_with_cookie (url, url_title, cookie);
+  return Rapicorn::url_test_show_with_cookie (url, url_title, cookie);
 }
diff --git a/sfi/sfiwrapper.hh b/sfi/sfiwrapper.hh
index 59506c4..2605dd1 100644
--- a/sfi/sfiwrapper.hh
+++ b/sfi/sfiwrapper.hh
@@ -3,10 +3,10 @@
 #define __SFI_WRAPPER_H__
 #include <stdbool.h>
 #include <sfi/glib-extra.hh>
-#include <birnet/birnetcdefs.h> /* include glib before birnet for G_LOG_DOMAIN */
-#include <birnet/birnetutils.hh>
+#include <rapicorn-core.hh>
 
 namespace Bse {
+using namespace Rapicorn;
 
 // == Likelyness Hinting ==
 #define BSE_ISLIKELY(expr)      RAPICORN_ISLIKELY(expr) ///< Compiler hint that @a expr is likely to be true.
@@ -26,32 +26,18 @@ bool        bse_flipper_check (const char *key);
 
 } // Bse
 
-/* sfiwrapper.h is a thin C language wrapper around C++ features
- * provided by libbirnet.
- */
+// sfiwrapper.h is a thin C language wrapper around C++ features
+
 /* --- short integer types --- */
-#ifdef __cplusplus
-#include <birnet/birnetutils.hh>
-using Birnet::uint8;
-using Birnet::uint16;
-using Birnet::uint32;
-using Birnet::uint64;
-using Birnet::int8;
-using Birnet::int16;
-using Birnet::int32;
-using Birnet::int64;
-using Birnet::unichar;
-#else
-typedef BirnetUInt8   uint8;
-typedef BirnetUInt16  uint16;
-typedef BirnetUInt32  uint32;
-typedef BirnetUInt64  uint64;
-typedef BirnetInt8    int8;
-typedef BirnetInt16   int16;
-typedef BirnetInt32   int32;
-typedef BirnetInt64   int64;
-typedef BirnetUnichar unichar;
-#endif
+using Rapicorn::uint8;
+using Rapicorn::uint16;
+using Rapicorn::uint32;
+using Rapicorn::uint64;
+using Rapicorn::int8;
+using Rapicorn::int16;
+using Rapicorn::int32;
+using Rapicorn::int64;
+using Rapicorn::unichar;
 
 extern "C" {
 


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