[beast] SFI: compile sfiring as C++ source



commit 94d300d882aa190ccdc360cebbb0c193aca4ff12
Author: Tim Janik <timj gtk org>
Date:   Mon May 9 03:35:44 2011 +0200

    SFI: compile sfiring as C++ source

 sfi/Makefile.am               |    2 +-
 sfi/{sfiring.c => sfiring.cc} |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/sfi/Makefile.am b/sfi/Makefile.am
index a8dceb6..1f89cef 100644
--- a/sfi/Makefile.am
+++ b/sfi/Makefile.am
@@ -23,7 +23,7 @@ sfi_all_sources = $(strip \
 	sfivmarshal.c	sfiglue.c	sfigluecodec.c	sfiglueproxy.c	\
 	sfinote.c	sfiparams.c	sfiprimitives.c	sfiserial.c	\
 	sfitime.c	sfitypes.c	sfivalues.c	sfiustore.c	\
-	sficxx.cc	sfiring.c	sfimemory.cc	sficomport.cc	\
+	sficxx.cc	sfiring.cc	sfimemory.cc	sficomport.cc	\
 	$(conditional_toyprof_sources)	\
 )
 sfi_extra_sources = $(strip \
diff --git a/sfi/sfiring.c b/sfi/sfiring.cc
similarity index 99%
rename from sfi/sfiring.c
rename to sfi/sfiring.cc
index 19d2feb..323c445 100644
--- a/sfi/sfiring.c
+++ b/sfi/sfiring.cc
@@ -59,8 +59,8 @@ sfi_pointer_cmp (gconstpointer   value1,
                  gconstpointer   value2,
                  gpointer        dummy)
 {
-  const char *p1 = value1;
-  const char *p2 = value2;
+  const char *p1 = (const char*) value1;
+  const char *p2 = (const char*) value2;
   return p1 < p2 ? -1 : p1 != p2;
 }
 
@@ -907,8 +907,8 @@ static inline int
 pointerloccmp (const void *pp1,
                const void *pp2)
 {
-  const gpointer *p1 = pp1;
-  const gpointer *p2 = pp2;
+  void* const * p1 = (void**) pp1;
+  void* const * p2 = (void**) pp2;
   return *p1 < *p2 ? -1 : *p1 != *p2;
 }
 
@@ -953,7 +953,7 @@ sfi_ring_reorder (SfiRing        *unordered_ring,
   if (!unordered_ring || !new_ring_order)
     return unordered_ring;
   const SfiRing *ring;
-  
+
   /* construct a sorted array for faster lookups; O(length(unordered_ring)) */
   gpointer *items = NULL;
   guint i, n_items = 0, n_alloced = 0;
@@ -970,7 +970,7 @@ sfi_ring_reorder (SfiRing        *unordered_ring,
   sfi_ring_free (unordered_ring);
   unordered_ring = NULL;
   qsort (items, n_items, sizeof (items[0]), pointerloccmp);
-  
+
   /* collapse duplicates; O(length(unordered_ring)) */
   guint j = 0, *counts = g_new0 (guint, n_items);
   for (i = 0; i < n_items; i++)



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