summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2021-10-06 18:20:16 +0200
committerCorentin Noël <corentin.noel@collabora.com>2021-10-06 18:20:16 +0200
commitb9ca5bb826aaac46585b67facf030559a287446f (patch)
tree93369f24d57140e9f2fe70208b92cbc69e01c2b6
parent8d3d127e3dfb836f647114df97d8315a14f04655 (diff)
downloadgcr-b9ca5bb826aaac46585b67facf030559a287446f.tar.gz
gck: Use G_DEFINE_QUARK to define GckUriError quark
-rw-r--r--gck/gck-uri.c14
-rw-r--r--gck/gck-uri.h4
2 files changed, 3 insertions, 15 deletions
diff --git a/gck/gck-uri.c b/gck/gck-uri.c
index 814b199..91d32c3 100644
--- a/gck/gck-uri.c
+++ b/gck/gck-uri.c
@@ -144,19 +144,7 @@ struct _GckUri {
GckAttributes *attributes;
};
-GQuark
-gck_uri_error_get_quark (void)
-{
- static GQuark domain = 0;
- static size_t quark_inited = 0;
-
- if (g_once_init_enter (&quark_inited)) {
- domain = g_quark_from_static_string ("gck-uri-error");
- g_once_init_leave (&quark_inited, 1);
- }
-
- return domain;
-}
+G_DEFINE_QUARK(gck-uri-error, gck_uri_error)
/**
* gck_uri_data_new:
diff --git a/gck/gck-uri.h b/gck/gck-uri.h
index 98970ca..ce48edf 100644
--- a/gck/gck-uri.h
+++ b/gck/gck-uri.h
@@ -52,9 +52,9 @@ struct _GckUriData {
gpointer dummy[4];
};
-#define GCK_URI_ERROR (gck_uri_error_get_quark ())
+#define GCK_URI_ERROR (gck_uri_error_quark ())
-GQuark gck_uri_error_get_quark (void) G_GNUC_CONST;
+GQuark gck_uri_error_quark (void) G_GNUC_CONST;
GckUriData* gck_uri_data_new (void);