[gnome-online-accounts/rhel-7.1: 30/34] provider: Use g_type_ensure for registering types
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/rhel-7.1: 30/34] provider: Use g_type_ensure for registering types
- Date: Mon, 4 Aug 2014 13:44:27 +0000 (UTC)
commit c162d008c08d507d9007e5ec8b30fe89c6e47357
Author: Debarshi Ray <debarshir gnome org>
Date: Mon May 19 18:32:19 2014 +0200
provider: Use g_type_ensure for registering types
Fixes: https://bugzilla.gnome.org/729173
src/goabackend/goaprovider.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 4fa30cf..89c3ff0 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Copyright (C) 2011, 2012, 2013 Red Hat, Inc.
+ * Copyright (C) 2011, 2012, 2013, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -653,39 +653,35 @@ ensure_builtins_loaded (void)
if (g_once_init_enter (&once_init_value))
{
- static volatile GType type = 0;
-
/* The order is in which the providers' types are created is
* important because it affects the order in which they are
* returned by goa_provider_get_all.
*/
#ifdef GOA_GOOGLE_ENABLED
- type = GOA_TYPE_GOOGLE_PROVIDER;
+ g_type_ensure (GOA_TYPE_GOOGLE_PROVIDER);
#endif
#ifdef GOA_OWNCLOUD_ENABLED
- type = GOA_TYPE_OWNCLOUD_PROVIDER;
+ g_type_ensure (GOA_TYPE_OWNCLOUD_PROVIDER);
#endif
#ifdef GOA_FACEBOOK_ENABLED
- type = GOA_TYPE_FACEBOOK_PROVIDER;
+ g_type_ensure (GOA_TYPE_FACEBOOK_PROVIDER);
#endif
#ifdef GOA_FLICKR_ENABLED
- type = GOA_TYPE_FLICKR_PROVIDER;
+ g_type_ensure (GOA_TYPE_FLICKR_PROVIDER);
#endif
#ifdef GOA_WINDOWS_LIVE_ENABLED
- type = GOA_TYPE_WINDOWS_LIVE_PROVIDER;
+ g_type_ensure (GOA_TYPE_WINDOWS_LIVE_PROVIDER);
#endif
#ifdef GOA_EXCHANGE_ENABLED
- type = GOA_TYPE_EXCHANGE_PROVIDER;
+ g_type_ensure (GOA_TYPE_EXCHANGE_PROVIDER);
#endif
#ifdef GOA_IMAP_SMTP_ENABLED
- type = GOA_TYPE_IMAP_SMTP_PROVIDER;
+ g_type_ensure (GOA_TYPE_IMAP_SMTP_PROVIDER);
#endif
#ifdef GOA_KERBEROS_ENABLED
- type = GOA_TYPE_KERBEROS_PROVIDER;
+ g_type_ensure (GOA_TYPE_KERBEROS_PROVIDER);
#endif
- type = type; /* silence -Wunused-but-set-variable */
-
g_once_init_leave (&once_init_value, 1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]