diff options
author | Anatoly Spektor | 2012-06-12 14:48:11 +0000 |
---|---|---|
committer | Silenio Quarti | 2012-06-18 19:45:43 +0000 |
commit | a8602d3db8252159f84e68a5bee636500a2d5d19 (patch) | |
tree | ce12472f2a7e4dbcde1d34f0198cbf0cac6efcf0 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | |
parent | 4aa744e8898dfdeafa32c91aa90156619bea3bea (diff) | |
download | eclipse.platform.swt-a8602d3db8252159f84e68a5bee636500a2d5d19.tar.gz eclipse.platform.swt-a8602d3db8252159f84e68a5bee636500a2d5d19.tar.xz eclipse.platform.swt-a8602d3db8252159f84e68a5bee636500a2d5d19.zip |
Make gdk_draw_polygon function dynamic
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 24 |
1 files changed, 9 insertions, 15 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 6610d5fef0..3c2ec6a5f0 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,24 +5442,18 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1polygon) { jint *lparg3=NULL; OS_NATIVE_ENTER(env, that, _1gdk_1draw_1polygon_FUNC); -#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); +*/ { - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + OS_LOAD_FUNCTION(fp, gdk_draw_polygon) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint *, jint))fp)(arg0, arg1, arg2, lparg3, arg4); + } } - gdk_draw_polygon((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (GdkPoint *)lparg3, (gint)arg4); fail: -#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); - } + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); OS_NATIVE_EXIT(env, that, _1gdk_1draw_1polygon_FUNC); } #endif |