[gcr/wip/gcr4] gcr: Use G_DEFINE_QUARK for GcrDataError
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/wip/gcr4] gcr: Use G_DEFINE_QUARK for GcrDataError
- Date: Tue, 5 Oct 2021 08:50:57 +0000 (UTC)
commit 8e0eb61d5f60ceb5664cf340d968949a04924ea7
Author: Corentin Noël <corentin noel collabora com>
Date: Tue Oct 5 10:45:25 2021 +0200
gcr: Use G_DEFINE_QUARK for GcrDataError
gcr/gcr-library.c | 9 +--------
gcr/gcr-types.h | 4 ++--
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index 3ee1eeb..4c3e0af 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -125,14 +125,7 @@ static gchar **trust_lookup_uris = NULL;
* ERRORS
*/
-GQuark
-gcr_data_error_get_domain (void)
-{
- static GQuark domain = 0;
- if (domain == 0)
- domain = g_quark_from_static_string ("gcr-parser-error");
- return domain;
-}
+G_DEFINE_QUARK(gcr-data-error, gcr_data_error)
/* -----------------------------------------------------------------------------
* INITIALIZATION
diff --git a/gcr/gcr-types.h b/gcr/gcr-types.h
index 095615a..116d02e 100644
--- a/gcr/gcr-types.h
+++ b/gcr/gcr-types.h
@@ -45,9 +45,9 @@
G_BEGIN_DECLS
-#define GCR_DATA_ERROR (gcr_data_error_get_domain ())
+#define GCR_DATA_ERROR (gcr_data_error_quark ())
-GQuark gcr_data_error_get_domain (void) G_GNUC_CONST;
+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]