Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-07-15 06:49:00 +0000
committerArun Thondapu2015-08-21 12:07:51 +0000
commit6dd06660f042cd52626138a7d63edac717fc0b6c (patch)
tree396fb5558281c1b4540f7c02de275691c75fb1cc /bundles/org.eclipse.swt.tools/JNI Generation/org
parent9f9ebc4f306f3d5694fb7de03114a630fbda2b35 (diff)
downloadeclipse.platform.swt-6dd06660f042cd52626138a7d63edac717fc0b6c.tar.gz
eclipse.platform.swt-6dd06660f042cd52626138a7d63edac717fc0b6c.tar.xz
eclipse.platform.swt-6dd06660f042cd52626138a7d63edac717fc0b6c.zip
Bug 472689 - Stop generating pre JNI 1.2 natives
It's useless nowadays and just adds churn in the generated code. Change-Id: Iecbdfc8a4c4da23df3e3e67e22d323862ad33d1d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt.tools/JNI Generation/org')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java28
1 files changed, 2 insertions, 26 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
index 9fd62b0b59..f783aa1bf8 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Red Hat Inc. - stop generating pre 1.2 JNI code
*******************************************************************************/
package org.eclipse.swt.tools.internal;
@@ -513,24 +514,12 @@ boolean generateGetters(JNIMethod method, JNIParameter[] params) {
}
}
if (criticalCount != 0) {
- outputln("#ifdef JNI_VERSION_1_2");
- outputln("\tif (IS_JNI_1_2) {");
for (int i = 0; i < params.length; i++) {
JNIParameter param = params[i];
if (isCritical(param)) {
genFailTag |= generateGetParameter(method, param, true, 2);
}
}
- outputln("\t} else");
- outputln("#endif");
- outputln("\t{");
- for (int i = 0; i < params.length; i++) {
- JNIParameter param = params[i];
- if (isCritical(param)) {
- genFailTag |= generateGetParameter(method, param, false, 2);
- }
- }
- outputln("\t}");
}
return genFailTag;
}
@@ -544,8 +533,6 @@ void generateSetters(JNIMethod method, JNIParameter[] params) {
}
}
if (criticalCount != 0) {
- outputln("#ifdef JNI_VERSION_1_2");
- outputln("\tif (IS_JNI_1_2) {");
for (int i = params.length - 1; i >= 0; i--) {
JNIParameter param = params[i];
if (isCritical(param)) {
@@ -553,17 +540,6 @@ void generateSetters(JNIMethod method, JNIParameter[] params) {
generateSetParameter(param, true);
}
}
- outputln("\t} else");
- outputln("#endif");
- outputln("\t{");
- for (int i = params.length - 1; i >= 0; i--) {
- JNIParameter param = params[i];
- if (isCritical(param)) {
- output("\t");
- generateSetParameter(param, false);
- }
- }
- outputln("\t}");
}
for (int i = params.length - 1; i >= 0; i--) {
JNIParameter param = params[i];

Back to the top