diff options
author | Silenio Quarti | 2012-09-17 21:21:30 +0000 |
---|---|---|
committer | Silenio Quarti | 2012-09-17 21:21:30 +0000 |
commit | 45ebb6f2bb21bad85e6e72f4a7314b8748844909 (patch) | |
tree | 2a5ec73a95d4319166f20189659bc637567ad777 /bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt | |
parent | 26a93997742e3fbea259c9c103559f5ff6796c72 (diff) | |
download | eclipse.platform.swt-45ebb6f2bb21bad85e6e72f4a7314b8748844909.tar.gz eclipse.platform.swt-45ebb6f2bb21bad85e6e72f4a7314b8748844909.tar.xz eclipse.platform.swt-45ebb6f2bb21bad85e6e72f4a7314b8748844909.zip |
do not generate function count to avoid patch conflicts
Diffstat (limited to 'bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt')
-rw-r--r-- | bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java index dd8a6d1ec7..e45b6dc277 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java @@ -100,23 +100,7 @@ void generateSourceFile(JNIClass clazz) { outputln("#ifdef NATIVE_STATS"); outputln(); JNIMethod[] methods = clazz.getDeclaredMethods(); - int methodCount = 0; - for (int i = 0; i < methods.length; i++) { - JNIMethod method = methods[i]; - if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; - methodCount++; - } String className = clazz.getSimpleName(); - output("int "); - output(className); - output("_nativeFunctionCount = "); - output(String.valueOf(methodCount)); - outputln(";"); - output("int "); - output(className); - output("_nativeFunctionCallCount["); - output(String.valueOf(methodCount)); - outputln("];"); output("char * "); output(className); outputln("_nativeFunctionNames[] = {"); @@ -143,6 +127,15 @@ void generateSourceFile(JNIClass clazz) { if (progress != null) progress.step(); } outputln("};"); + output("#define NATIVE_FUNCTION_COUNT sizeof("); + output(className); + outputln("_nativeFunctionNames) / sizeof(char*)"); + output("int "); + output(className); + outputln("_nativeFunctionCount = NATIVE_FUNCTION_COUNT;"); + output("int "); + output(className); + outputln("_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];"); outputln(); generateStatsNatives(className); outputln(); |