[java-atk-wrapper] AtkWrapper: use g_mutex_init
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] AtkWrapper: use g_mutex_init
- Date: Thu, 20 Nov 2014 20:49:09 +0000 (UTC)
commit dd3e623536422799e8a4437bb892b0fac7476e36
Author: Magdalen Berns <m berns thismagpie com>
Date: Thu Nov 20 20:47:51 2014 +0000
AtkWrapper: use g_mutex_init
g_mutex_new is deprecated, use g_mutex_init instead
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=740270
jni/src/AtkWrapper.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index 176f746..210d726 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -59,6 +59,12 @@ static gboolean (*origin_g_idle_dispatch) (GSource*, GSourceFunc, gpointer);
static GModule* module_atk_bridge = NULL;
+typedef struct {
+ GMutex jg_mutex;
+} JGMutex;
+
+JGMutex *jmutex;
+
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *javaVM, void *reserve)
{
JNIEnv *env;
@@ -176,10 +182,10 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_initNativeLibrary(JNIEnv *jniEnv
jaw_impl_init_mutex();
- atk_bridge_mutex = g_mutex_new();
- atk_bridge_cond = g_cond_new();
+ jmutex = g_new(JGMutex, 1);
+ g_mutex_init (&jmutex->jg_mutex);
- key_dispatch_mutex = g_mutex_new();
+ atk_bridge_cond = g_cond_new();
key_dispatch_cond = g_cond_new();
// Dummy idle function for jaw_idle_dispatch to get
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]