[gnome-keyring/introspection: 5/7] gcr: Fix several warnings related to introspection building



commit 12a305ddf10dc624594e8ca9f4b0d898bdd0f2c4
Author: Stef Walter <stefw collabora co uk>
Date:   Thu Aug 11 22:35:03 2011 +0200

    gcr: Fix several warnings related to introspection building

 gcr/gcr-certificate.c |    2 +-
 gcr/gcr-certificate.h |    2 +-
 gcr/gcr-deprecated.h  |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 gcr/gcr-library.c     |    7 +++++++
 gcr/gcr-live-search.c |    2 ++
 gcr/gcr-types.h       |   22 ++++++++++++----------
 6 files changed, 71 insertions(+), 12 deletions(-)
---
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index 0f4497e..7a4bec7 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -381,7 +381,7 @@ gcr_certificate_get_type (void)
  * PUBLIC 
  */
 
-const GcrColumn*
+const GcrColumn *
 gcr_certificate_get_columns (void)
 {
 	static GcrColumn columns[] = {
diff --git a/gcr/gcr-certificate.h b/gcr/gcr-certificate.h
index 504b643..2f22b44 100644
--- a/gcr/gcr-certificate.h
+++ b/gcr/gcr-certificate.h
@@ -64,7 +64,7 @@ GType               gcr_certificate_get_type               (void);
 gconstpointer       gcr_certificate_get_der_data           (GcrCertificate *self,
                                                             gsize *n_data);
 
-const GcrColumn*    gcr_certificate_get_columns            (void);
+const GcrColumn *   gcr_certificate_get_columns            (void);
 
 gint                gcr_certificate_compare                (GcrComparable *first,
                                                             GcrComparable *other);
diff --git a/gcr/gcr-deprecated.h b/gcr/gcr-deprecated.h
new file mode 100644
index 0000000..1b24ae4
--- /dev/null
+++ b/gcr/gcr-deprecated.h
@@ -0,0 +1,48 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Author: Stef Walter <stefw collabora co uk>
+ */
+
+#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> can be included directly."
+#endif
+
+
+#ifndef GCR_DEPRECATED_H_
+#define GCR_DEPRECATED_H_
+
+#include <glib.h>
+
+#include <gck/gck.h>
+
+#ifndef GCR_DISABLE_DEPRECATED
+
+GQuark 	            gcr_data_error_get_domain         (void) G_GNUC_CONST;
+
+#define             GCR_ERROR                         (gcr_error_get_domain ())
+
+GQuark              gcr_error_get_domain              (void) G_GNUC_CONST;
+
+#endif /* GCR_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* GCRTYPES_H_ */
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index 7a44092..38dbc9f 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -89,6 +89,13 @@ static gchar **trust_lookup_uris = NULL;
 GQuark
 gcr_data_error_get_domain (void)
 {
+	/* DEPRECATED */
+	return gcr_data_error_quark ();
+}
+
+GQuark
+gcr_data_error_quark (void)
+{
 	static GQuark domain = 0;
 	if (domain == 0)
 		domain = g_quark_from_static_string ("gcr-parser-error");
diff --git a/gcr/gcr-live-search.c b/gcr/gcr-live-search.c
index b0f4414..dc78fde 100644
--- a/gcr/gcr-live-search.c
+++ b/gcr/gcr-live-search.c
@@ -27,6 +27,8 @@
 
 #include "config.h"
 
+#undef G_DISABLE_DEPRECATED
+
 #include "gcr-live-search.h"
 #include "gcr-marshal.h"
 
diff --git a/gcr/gcr-types.h b/gcr/gcr-types.h
index 86b2e8c..483d23e 100644
--- a/gcr/gcr-types.h
+++ b/gcr/gcr-types.h
@@ -31,10 +31,20 @@
 #include <glib.h>
 
 #ifndef GCK_API_SUBJECT_TO_CHANGE
+
+/**
+ * GCK_API_SUBJECT_TO_CHANGE: (skip):
+ */
 #define GCK_API_SUBJECT_TO_CHANGE 1
+
+/**
+ * __GCR_DEFINED_GCK_SUBJECT_TO_CHANGE__: (skip):
+ */
 #define __GCR_DEFINED_GCK_SUBJECT_TO_CHANGE__ 1
+
 #endif
 
+
 #include <gck/gck.h>
 
 #ifdef __GCR_DEFINED_GCK_SUBJECT_TO_CHANGE__
@@ -43,17 +53,9 @@
 
 G_BEGIN_DECLS
 
-#define             GCR_DATA_ERROR                    (gcr_data_error_get_domain ())
-
-GQuark 	            gcr_data_error_get_domain         (void) G_GNUC_CONST;
-
-#ifndef GCR_DISABLE_DEPRECATED
-
-#define             GCR_ERROR                         (gcr_error_get_domain ())
-
-GQuark              gcr_error_get_domain              (void) G_GNUC_CONST;
+#define             GCR_DATA_ERROR                    (gcr_data_error_quark ())
 
-#endif /* GCR_DISABLE_DEPRECATED */
+GQuark              gcr_data_error_quark              (void) G_GNUC_CONST;
 
 typedef enum {
 	GCR_ERROR_FAILURE = -1,



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