[java-atk-wrapper] Fixed build problem of loop variables outside C99 mode



commit cc4a4fba6619be5e80274350d67ea76ea276598b
Author: Mario Lang <mlang debian org>
Date:   Tue Jul 7 11:14:33 2009 +0800

    Fixed build problem of loop variables outside C99 mode

 jni/src/jawimpl.c     |    6 ++++--
 jni/src/jawobject.c   |    3 ++-
 jni/src/jawtable.c    |    6 ++++--
 jni/src/jawtoplevel.c |    3 ++-
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/jni/src/jawimpl.c b/jni/src/jawimpl.c
index 05bdde5..ec6d633 100644
--- a/jni/src/jawimpl.c
+++ b/jni/src/jawimpl.c
@@ -649,7 +649,8 @@ jaw_impl_ref_relation_set (AtkObject *atk_obj)
 	jobjectArray jrel_arr = (*jniEnv)->CallObjectMethod(jniEnv, jrel_set, jmid);
 	jsize jarr_size = (*jniEnv)->GetArrayLength(jniEnv, jrel_arr);
 
-	for (jsize i = 0; i < jarr_size; i++) {
+	jsize i;
+	for (i = 0; i < jarr_size; i++) {
 		jobject jrel = (*jniEnv)->GetObjectArrayElement(jniEnv, jrel_arr, i);
 		jclass classAccessibleRelation = (*jniEnv)->FindClass( jniEnv, "javax/accessibility/AccessibleRelation" );
 		jmid = (*jniEnv)->GetMethodID( jniEnv, classAccessibleRelation, "getKey", "()Ljava/lang/String;" );
@@ -661,7 +662,8 @@ jaw_impl_ref_relation_set (AtkObject *atk_obj)
 		jobjectArray jtarget_arr = (*jniEnv)->CallObjectMethod( jniEnv, jrel, jmid );
 		jsize jtarget_size = (*jniEnv)->GetArrayLength(jniEnv, jtarget_arr);
 
-		for (jsize j = 0; j < jtarget_size; j++) {
+		jsize j;
+		for (j = 0; j < jtarget_size; j++) {
 			jobject jtarget = (*jniEnv)->GetObjectArrayElement(jniEnv, jtarget_arr, j);
 			jclass classAccessible = (*jniEnv)->FindClass( jniEnv, "javax/accessibility/Accessible" );
 			if ((*jniEnv)->IsInstanceOf(jniEnv, jtarget, classAccessible)) {
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index 5238e31..be27145 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -325,7 +325,8 @@ jaw_object_ref_state_set (AtkObject *atk_obj)
 	jobjectArray jstate_arr = (*jniEnv)->CallObjectMethod( jniEnv, jstate_set, jmid );
 
 	jsize jarr_size = (*jniEnv)->GetArrayLength(jniEnv, jstate_arr);
-	for (jsize i = 0; i < jarr_size; i++) {
+	jsize i;
+	for (i = 0; i < jarr_size; i++) {
 		jobject jstate = (*jniEnv)->GetObjectArrayElement( jniEnv, jstate_arr, i );
 		AtkStateType state_type = jaw_util_get_atk_state_type_from_java_state( jniEnv, jstate );
 		atk_state_set_add_state( state_set, state_type );
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index d6954e9..6f070bb 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -407,7 +407,8 @@ jaw_table_get_selected_columns (AtkTable *table, gint **selected)
 	jint *jcolumns = (*jniEnv)->GetIntArrayElements(jniEnv, jcolumnArray, NULL);
 	gint *columns = g_new(gint, length);
 
-	for (gint i = 0; i < length; i++) {
+	gint i;
+	for (i = 0; i < length; i++) {
 		columns[i] = (gint)jcolumns[i];
 	}
 
@@ -436,7 +437,8 @@ jaw_table_get_selected_rows (AtkTable *table, gint **selected)
 	jint *jrows = (*jniEnv)->GetIntArrayElements(jniEnv, jrowArray, NULL);
 	gint *rows = g_new(gint, length);
 
-	for (gint i = 0; i < length; i++) {
+	gint i;
+	for (i = 0; i < length; i++) {
 		rows[i] = (gint)jrows[i];
 	}
 
diff --git a/jni/src/jawtoplevel.c b/jni/src/jawtoplevel.c
index e33da72..e84d7af 100644
--- a/jni/src/jawtoplevel.c
+++ b/jni/src/jawtoplevel.c
@@ -85,7 +85,8 @@ jaw_toplevel_object_finalize (GObject *obj)
 static G_CONST_RETURN gchar*
 jaw_toplevel_get_name (AtkObject *obj)
 {
-	for(gint i = 0; i < atk_object_get_n_accessible_children(obj); i++) {
+	gint i;
+	for(i = 0; i < atk_object_get_n_accessible_children(obj); i++) {
 		AtkObject* child = atk_object_ref_accessible_child(obj, i);
 		const gchar* name = atk_object_get_name(child);
 		if (name && strlen(name) > 0) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]