diff options
author | Sven Gothel <[email protected]> | 2015-03-11 08:42:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-11 08:42:26 +0100 |
commit | f664f7e950ff60d73e488801cf7f37878588203d (patch) | |
tree | 1519877aea5e702b9218df8c04f47492364ee35f /src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java | |
parent | c3b2a86bb9051d6f03c3f104eff2dbe6cefc1803 (diff) |
Bug 1144 - Add 'DelegateImplementation': Cleanup MethodBinding/FunctionBinding Semantics
- Clarify name semantics: name -> [interfaceName, implName, nativeName]
- JavaMethodBindingEmitter: Refine native identity via isNativeMethod + isPrivateNativeMethod
- ProcAddressEmitter: Remove hack whether we need to wrap .. use isNativeMethod + isPrivateNativeMethod
Diffstat (limited to 'src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java')
-rw-r--r-- | src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java b/src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java index 6418a53..25e5a66 100644 --- a/src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java +++ b/src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java @@ -204,16 +204,10 @@ public class ProcAddressEmitter extends JavaEmitter { // 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 + // it to emit a body, and produce another one to act as the entry point final boolean needsJavaWrapper = baseJavaEmitter.signatureOnly() && - !baseJavaEmitter.hasModifier(JavaMethodBindingEmitter.PRIVATE) && - baseJavaEmitter.hasModifier(JavaMethodBindingEmitter.NATIVE) && + baseJavaEmitter.isNativeMethod() && + !baseJavaEmitter.isPrivateNativeMethod() && callThroughProcAddress; @@ -221,7 +215,7 @@ public class ProcAddressEmitter extends JavaEmitter { final ProcAddressJavaMethodBindingEmitter emitter = new ProcAddressJavaMethodBindingEmitter(baseJavaEmitter, callThroughProcAddress, getProcAddressConfig().getProcAddressTableExpr(), - baseJavaEmitter.isForNativeMethod(), + baseJavaEmitter.isPrivateNativeMethod(), this); if( needsJavaWrapper ) { emitter.setEmitBody(true); @@ -238,7 +232,7 @@ public class ProcAddressEmitter extends JavaEmitter { getProcAddressConfig().getProcAddressTableExpr(), true, this); - emitter.setForImplementingMethodCall(true); + emitter.setPrivateNativeMethod(true); fixSecurityModifiers(emitter); emitters.add(emitter); } |