From b5361ce6534deeabbd37381e365154168c5e54f4 Mon Sep 17 00:00:00 2001 From: Silenio Quarti Date: Mon, 18 Jun 2012 16:03:06 -0400 Subject: put back JNI generator flags --- .../org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 20 +++++++++++++++++--- .../Eclipse SWT PI/gtk/library/os_stats.c | 4 ++-- .../gtk/org/eclipse/swt/internal/gtk/OS.java | 2 ++ 3 files changed, 21 insertions(+), 5 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 3c2ec6a5f0..31fbf4bae1 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 @@ -5442,7 +5442,14 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1polygon) { jint *lparg3=NULL; OS_NATIVE_ENTER(env, that, _1gdk_1draw_1polygon_FUNC); - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; +#ifdef JNI_VERSION_1_2 + if (IS_JNI_1_2) { + if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail; + } else +#endif + { + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + } /* gdk_draw_polygon(arg0, arg1, arg2, lparg3, arg4); */ @@ -5453,7 +5460,14 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1polygon) } } fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); +#ifdef JNI_VERSION_1_2 + if (IS_JNI_1_2) { + if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, JNI_ABORT); + } else +#endif + { + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, JNI_ABORT); + } OS_NATIVE_EXIT(env, that, _1gdk_1draw_1polygon_FUNC); } #endif @@ -5719,7 +5733,7 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1get_1values) { GdkGCValues _arg1, *lparg1=NULL; OS_NATIVE_ENTER(env, that, _1gdk_1gc_1get_1values_FUNC); - if (arg1) if ((lparg1 = getGdkGCValuesFields(env, arg1, &_arg1)) == NULL) goto fail; + if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; /* gdk_gc_get_values(arg0, lparg1); */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index cd4e180974..332cce96d1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -18,8 +18,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 1402; -int OS_nativeFunctionCallCount[1402]; +int OS_nativeFunctionCount = 1403; +int OS_nativeFunctionCallCount[1403]; char * OS_nativeFunctionNames[] = { #ifndef JNI64 "Call__IIII", 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 5d8361232b..3127cd21d0 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 @@ -4040,6 +4040,7 @@ public static final void gdk_draw_point(int /*long*/ drawable, int /*long*/ gc, } /** * @method flags=dynamic + * @param points flags=no_out critical */ public static final native void _gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints); public static final void gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints) { @@ -4270,6 +4271,7 @@ public static final void gdk_flush() { } /** * @method flags=dynamic + * @param values flags=no_in */ public static final native void _gdk_gc_get_values(int /*long*/ gc, GdkGCValues values); public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values) { -- cgit