summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-06-29 00:14:56 +0000
committerKenneth Russel <[email protected]>2007-06-29 00:14:56 +0000
commite31cfbb6ebcdb01d27fa72c76de506aee75d90d6 (patch)
treead4cd20e55b00b4a7127fd88e0f866182c8728d0
parent1e1747d829522e7050c195ff46a824fbfaf7217b (diff)
Fixed bug in handling of package-private native methods called through
procedure addresses git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@65 a78bb65f-1512-4460-ba86-f6dc96a7bf27
-rwxr-xr-xsrc/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java b/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
index 397f157..fe77248 100755
--- a/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
+++ b/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
@@ -197,11 +197,17 @@ public class ProcAddressEmitter extends JavaEmitter
this);
emitters.add(emitter);
- // If this emitter doesn't have a body (i.e., is a public native
- // call), we need to force it to emit a body, and produce another
- // one to act as the entry point
+ // If this emitter doesn't have a body (i.e., is a direct native
+ // call with no intervening argument processing), we need to force
+ // it to emit a body, and produce another one to act as the entry
+ // point
+ // FIXME: the negative test against the PRIVATE modifier is a
+ // nasty hack to prevent the ProcAddressJavaMethodBindingEmitter
+ // from incorrectly introducing method bodies to the private
+ // native implementing methods; want this to work at least for
+ // public and package-private methods
if (baseJavaEmitter.signatureOnly() &&
- baseJavaEmitter.hasModifier(JavaMethodBindingEmitter.PUBLIC) &&
+ !baseJavaEmitter.hasModifier(JavaMethodBindingEmitter.PRIVATE) &&
baseJavaEmitter.hasModifier(JavaMethodBindingEmitter.NATIVE) &&
callThroughProcAddress) {
emitter.setEmitBody(true);