diff options
author | Silenio Quarti | 2009-03-13 16:42:27 +0000 |
---|---|---|
committer | Silenio Quarti | 2009-03-13 16:42:27 +0000 |
commit | 2a77638689e90a994723410853e87bc8d365587d (patch) | |
tree | f28acb7c05c7b71ada4de1041d050f7cee642489 /bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt | |
parent | 45e7cb56ec54dbaabbc35532642a56d2bbcf1119 (diff) | |
download | eclipse.platform.swt-2a77638689e90a994723410853e87bc8d365587d.tar.gz eclipse.platform.swt-2a77638689e90a994723410853e87bc8d365587d.tar.xz eclipse.platform.swt-2a77638689e90a994723410853e87bc8d365587d.zip |
junit tests in cocoa (wrong dynamic call)
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/NativesGenerator.java | 10 |
1 files changed, 8 insertions, 2 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 8459052a02..358abcce1c 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 @@ -487,11 +487,17 @@ void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNITyp if (i != 0) output(", "); JNIParameter param = params[i]; String cast = param.getCast(); + boolean isStruct = param.getFlag(FLAG_STRUCT); if (cast.length() > 2) { - output(cast.substring(1, cast.length() - 1)); + cast = cast.substring(1, cast.length() - 1); + if (isStruct) { + int index = cast.lastIndexOf('*'); + if (index != -1) cast = cast.substring(0, index).trim(); + } + output(cast); } else { JNIType paramType = param.getType(), paramType64 = param.getType64(); - output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT))); + output(paramType.getTypeSignature4(!paramType.equals(paramType64), isStruct)); } } output("))"); |