Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2013-07-31 10:48:18 -0400
committerArun Thondapu2013-07-31 10:48:18 -0400
commit32018a23dcca329752faf81300feb169d09b6240 (patch)
tree436862a6730b52d5426595be84097e4ab19278ed
parent9a41049842260567fdbda8010098000382026861 (diff)
downloadeclipse.platform.swt-32018a23dcca329752faf81300feb169d09b6240.tar.gz
eclipse.platform.swt-32018a23dcca329752faf81300feb169d09b6240.tar.xz
eclipse.platform.swt-32018a23dcca329752faf81300feb169d09b6240.zip
Bug 320487 - Eclipse crashes when listing certain files (e.g. *.fl) in
project explorer
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java2
3 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 379bf159a9..ff815205cc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -2669,23 +2669,23 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1new)
#ifndef NO__1g_1data_1input_1stream_1read_1line
JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1read_1line)
- (JNIEnv *env, jclass that, jintLong arg0, jlongArray arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLong arg2, jintLong arg3)
{
- jlong *lparg1=NULL;
+ jintLong *lparg1=NULL;
jintLong rc = 0;
OS_NATIVE_ENTER(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
rc = (jintLong)g_data_input_stream_read_line(arg0, lparg1, arg2, arg3);
*/
{
OS_LOAD_FUNCTION(fp, g_data_input_stream_read_line)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jlong *, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3);
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong *, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3);
}
}
fail:
- if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
return rc;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 750f49cf91..e5dcf1bdef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -2018,8 +2018,8 @@ public static final long /*int*/ g_data_input_stream_new(long /*int*/ input_stre
}
}
/** @method flags=dynamic */
-public static final native long /*int*/ _g_data_input_stream_read_line(long /*int*/ stream, long[] count, long /*int*/ cancellable, long /*int*/ error);
-public static final long /*int*/ g_data_input_stream_read_line(long /*int*/ stream, long[] count, long /*int*/ cancellable, long /*int*/ error) {
+public static final native long /*int*/ _g_data_input_stream_read_line(long /*int*/ stream, long /*int*/ [] count, long /*int*/ cancellable, long /*int*/ error);
+public static final long /*int*/ g_data_input_stream_read_line(long /*int*/ stream, long /*int*/ [] count, long /*int*/ cancellable, long /*int*/ error) {
lock.lock();
try {
return _g_data_input_stream_read_line(stream, count, cancellable, error);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index ded302c8ba..2c30223082 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -690,7 +690,7 @@ static Hashtable gio_getMimeInfo() {
mimeTable = new Hashtable();
modTime = modTimestamp[0];
long /*int*/ reader = OS.g_data_input_stream_new (fileInputStream);
- long[] length = new long[1];
+ long /*int*/ [] length = new long /*int*/ [1];
if (reader != 0) {
long /*int*/ linePtr = OS.g_data_input_stream_read_line (reader, length, 0, 0);

Back to the top