summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.tools/JNI Generation
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2008-09-11 15:37:06 +0000
committerSilenio Quarti <silenio>2008-09-11 15:37:06 +0000
commitb2a7bd8c826aba183c570104382c1d0f35dd8698 (patch)
tree4269719932ce9e48dbb4294d93f1e986d77110fe /bundles/org.eclipse.swt.tools/JNI Generation
parent2d914fcedcb0c63f85a01a949b658b18fdaca68c (diff)
downloadeclipse.platform.swt-b2a7bd8c826aba183c570104382c1d0f35dd8698.tar.gz
eclipse.platform.swt-b2a7bd8c826aba183c570104382c1d0f35dd8698.tar.xz
eclipse.platform.swt-b2a7bd8c826aba183c570104382c1d0f35dd8698.zip
Bug 211796 - Regenerate the PI ("Platform Interface") to better match cocoa (boolean return)
Diffstat (limited to 'bundles/org.eclipse.swt.tools/JNI Generation')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java6
1 files changed, 5 insertions, 1 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 4b3eab01f5..26bc402b87 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
@@ -671,7 +671,11 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
}
if (method.getFlag(Flags.FLAG_CAST)) {
output("((");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ String returnCast = returnType.getTypeSignature2(!returnType.equals(returnType64));
+ if (name.equals("objc_msgSend_bool") && returnCast.equals("jboolean")) {
+ returnCast = "BOOL";
+ }
+ output(returnCast);
output(" (*)(");
for (int i = 0; i < params.length; i++) {
if (i != 0) output(", ");