[gnome-keyring] gcr: More deprecation tweaking so we can build on FC16



commit 280e18a03dcb3c134c0145b2a3d521435b1fc7a4
Author: Stef Walter <stefw collabora co uk>
Date:   Tue Sep 27 19:25:39 2011 +0200

    gcr: More deprecation tweaking so we can build on FC16

 gcr/gcr-library.c     |    2 +-
 gcr/gcr-live-search.c |    8 ++++----
 gcr/gcr-parser.c      |    4 ++++
 3 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index b190a94..342407a 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -115,7 +115,7 @@ _gcr_initialize_library (void)
 {
 	static gint gcr_initialize = 0;
 
-#if GLIB_CHECK_VERSION (2,30,0)
+#if GLIB_CHECK_VERSION (2,29,90)
 	if (g_atomic_int_add (&gcr_initialize, 1) == 0)
 #else
 	if (g_atomic_int_exchange_and_add (&gcr_initialize, 1) == 0)
diff --git a/gcr/gcr-live-search.c b/gcr/gcr-live-search.c
index 291a6d2..c8fb8b1 100644
--- a/gcr/gcr-live-search.c
+++ b/gcr/gcr-live-search.c
@@ -64,7 +64,7 @@ stripped_char (gunichar ch)
 {
 	gunichar retval = 0;
 	GUnicodeType utype;
-#if GLIB_CHECK_VERSION (2,30,0)
+#if GLIB_CHECK_VERSION (2,29,90)
 	gunichar decomp[4];
 #else
 	gunichar *decomp;
@@ -78,7 +78,7 @@ stripped_char (gunichar ch)
 	case G_UNICODE_FORMAT:
 	case G_UNICODE_UNASSIGNED:
 	case G_UNICODE_NON_SPACING_MARK:
-#if GLIB_CHECK_VERSION (2,30,0)
+#if GLIB_CHECK_VERSION (2,29,90)
 	case G_UNICODE_SPACING_MARK:
 #else
 	case G_UNICODE_COMBINING_MARK:
@@ -112,7 +112,7 @@ stripped_char (gunichar ch)
 	case G_UNICODE_SPACE_SEPARATOR:
 	default:
 		ch = g_unichar_tolower (ch);
-#if GLIB_CHECK_VERSION (2,30,0)
+#if GLIB_CHECK_VERSION (2,29,90)
 		dlen = g_unichar_fully_decompose (ch, FALSE, decomp, 4);
 		if (dlen > 0) {
 #else
@@ -120,7 +120,7 @@ stripped_char (gunichar ch)
 		if (decomp != NULL) {
 #endif
 			retval = decomp[0];
-#if !GLIB_CHECK_VERSION (2,30,0)
+#if !GLIB_CHECK_VERSION (2,29,90)
 			g_free (decomp);
 #endif
 		}
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index 0483e5b..95624d0 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -2280,7 +2280,11 @@ gcr_parsed_ref (GcrParsed *parsed)
 	g_return_val_if_fail (parsed != NULL, NULL);
 
 	/* Already had a reference */
+#if GLIB_CHECK_VERSION (2,29,90)
+	if (g_atomic_int_add (&parsed->refs, 1) >= 1)
+#else
 	if (g_atomic_int_exchange_and_add (&parsed->refs, 1) >= 1)
+#endif
 		return parsed;
 
 	/* If this is the first reference, flatten the stack of parsed */



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