summaryrefslogtreecommitdiff
path: root/egg
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2012-12-22 13:21:20 +0100
committerStef Walter <stefw@gnome.org>2013-04-19 18:51:12 +0200
commit87d5307b91d733dac7277c28f4b760d4f90a5a4a (patch)
tree39bcea69ee651f9bc6b4e11a7788439f7314dd8a /egg
parent4c0b5cd06cf4606c6faec96d68a82a4fb5639347 (diff)
downloadgnome-keyring-87d5307b91d733dac7277c28f4b760d4f90a5a4a.tar.gz
Update for deprecations in GLib
* Use GMutex insteod of GStaticMutex * Don't use g_thread_supported
Diffstat (limited to 'egg')
-rw-r--r--egg/egg-libgcrypt.c3
-rw-r--r--egg/egg-secure-memory.h6
2 files changed, 4 insertions, 5 deletions
diff --git a/egg/egg-libgcrypt.c b/egg/egg-libgcrypt.c
index efb7372e..3d8f95bf 100644
--- a/egg/egg-libgcrypt.c
+++ b/egg/egg-libgcrypt.c
@@ -100,8 +100,7 @@ egg_libgcrypt_initialize (void)
/* Only initialize libgcrypt if it hasn't already been initialized */
if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) {
- if (g_thread_supported())
- gcry_control (GCRYCTL_SET_THREAD_CBS, &glib_thread_cbs);
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &glib_thread_cbs);
gcry_check_version (LIBGCRYPT_VERSION);
gcry_set_log_handler (log_handler, NULL);
gcry_set_outofcore_handler (no_mem_handler, NULL);
diff --git a/egg/egg-secure-memory.h b/egg/egg-secure-memory.h
index 969dbd73..51815511 100644
--- a/egg/egg-secure-memory.h
+++ b/egg/egg-secure-memory.h
@@ -57,11 +57,11 @@ typedef struct {
lock, unlock, fallback, NULL, EGG_SECURE_POOL_VER_STR };
#define EGG_SECURE_DEFINE_GLIB_GLOBALS() \
- static GStaticMutex memory_mutex = G_STATIC_MUTEX_INIT; \
+ static GMutex memory_mutex = { 0, }; \
static void egg_memory_lock (void) \
- { g_static_mutex_lock (&memory_mutex); } \
+ { g_mutex_lock (&memory_mutex); } \
static void egg_memory_unlock (void) \
- { g_static_mutex_unlock (&memory_mutex); } \
+ { g_mutex_unlock (&memory_mutex); } \
EGG_SECURE_DEFINE_GLOBALS (egg_memory_lock, egg_memory_unlock, g_realloc);
extern egg_secure_glob EGG_SECURE_GLOBALS;