[java-atk-wrapper] Fix integer casting for AtkWrapper and jawimpl
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Fix integer casting for AtkWrapper and jawimpl
- Date: Mon, 17 Nov 2014 21:14:23 +0000 (UTC)
commit e3dc525630497b7a51a363bce8e79184384d6910
Author: Magdalen Berns <m berns thismagpie com>
Date: Mon Nov 17 21:12:52 2014 +0000
Fix integer casting for AtkWrapper and jawimpl
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=740279
jni/src/AtkWrapper.c | 4 ++--
jni/src/jawimpl.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index a2a6820..91ef379 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -876,13 +876,13 @@ signal_emit_handler (gpointer p)
gint newValue = get_int_value(jniEnv,
(*jniEnv)->GetObjectArrayElement(jniEnv, args, 0));
- gint prevCount = (gint)g_hash_table_lookup(jaw_obj->storedData,
+ gint prevCount = *(gint*)g_hash_table_lookup(jaw_obj->storedData,
"Previous_Count");
gint curCount = atk_text_get_character_count(ATK_TEXT(jaw_obj));
g_hash_table_insert(jaw_obj->storedData,
"Previous_Count",
- (gpointer)curCount);
+ (gpointer)&curCount);
if (curCount > prevCount)
{
diff --git a/jni/src/jawimpl.c b/jni/src/jawimpl.c
index ec6d633..d7f9387 100644
--- a/jni/src/jawimpl.c
+++ b/jni/src/jawimpl.c
@@ -102,7 +102,7 @@ object_table_insert ( JNIEnv *jniEnv, jobject ac, JawImpl * jaw_impl )
gint hash_key = (gint)(*jniEnv)->CallIntMethod( jniEnv, ac, jmid );
g_mutex_lock(objectTableMutex);
- g_hash_table_insert(objectTable, (gpointer)hash_key, (gpointer)jaw_impl);
+ g_hash_table_insert(objectTable, (gpointer)&hash_key, (gpointer)jaw_impl);
g_mutex_unlock(objectTableMutex);
}
@@ -115,7 +115,7 @@ object_table_lookup ( JNIEnv *jniEnv, jobject ac )
gpointer value = NULL;
g_mutex_lock(objectTableMutex);
- value = g_hash_table_lookup(objectTable, (gpointer)hash_key);
+ value = g_hash_table_lookup(objectTable, (gpointer)&hash_key);
g_mutex_unlock(objectTableMutex);
return (JawImpl*)value;
@@ -129,7 +129,7 @@ object_table_remove (JNIEnv *jniEnv, jobject ac )
gint hash_key = (gint)(*jniEnv)->CallIntMethod( jniEnv, ac, jmid );
g_mutex_lock(objectTableMutex);
- g_hash_table_remove( objectTable, (gpointer)hash_key );
+ g_hash_table_remove( objectTable, (gpointer)&hash_key );
g_mutex_unlock(objectTableMutex);
}
@@ -335,7 +335,7 @@ jaw_impl_get_type (guint tflag)
typeTable = g_hash_table_new( NULL, NULL );
}
- type = (GType)g_hash_table_lookup(typeTable, (gpointer)tflag);
+ type = (GType)g_hash_table_lookup(typeTable, (gpointer)&tflag);
if (type == 0) {
GTypeInfo tinfo = {
sizeof(JawImplClass),
@@ -401,7 +401,7 @@ jaw_impl_get_type (guint tflag)
&atk_table_info);
}
- g_hash_table_insert(typeTable, (gpointer)tflag, (gpointer)type);
+ g_hash_table_insert(typeTable, (gpointer)&tflag, (gpointer)type);
}
return type;
@@ -482,7 +482,7 @@ jaw_impl_get_interface_data (JawObject *jaw_obj, guint iface)
return NULL;
}
- JawInterfaceInfo *info = g_hash_table_lookup(jaw_impl->ifaceTable, (gpointer)iface);
+ JawInterfaceInfo *info = g_hash_table_lookup(jaw_impl->ifaceTable, (gpointer)&iface);
if (info) {
return info->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]