aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-11 08:42:26 +0100
committerSven Gothel <[email protected]>2015-03-11 08:42:26 +0100
commitf664f7e950ff60d73e488801cf7f37878588203d (patch)
tree1519877aea5e702b9218df8c04f47492364ee35f /src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
parentc3b2a86bb9051d6f03c3f104eff2dbe6cefc1803 (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/ProcAddressCMethodBindingEmitter.java')
-rw-r--r--src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
index 57a50cc..37a39e1 100644
--- a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
@@ -66,11 +66,11 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
super(
new MethodBinding(methodToWrap.getBinding()) {
@Override
- public String getName() {
+ public String getImplName() {
if (callThroughProcAddress) {
- return ProcAddressEmitter.WRAP_PREFIX + super.getName();
+ return ProcAddressEmitter.WRAP_PREFIX + super.getImplName();
} else {
- return super.getName();
+ return super.getImplName();
}
}
},
@@ -121,7 +121,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
if (callThroughProcAddress) {
// create variable for the function pointer with the right type, and set
// it to the value of the passed-in proc address
- final FunctionSymbol cSym = getBinding().getCSymbol();
+ final FunctionSymbol cSym = binding.getCSymbol();
// Always emit the local typedef, based on our parsing results.
// In case we do have the public typedef from the original header,
@@ -145,7 +145,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
writer.print(" ");
writer.print(funcPointerTypedefName); // Uses public typedef if available!
writer.print(" ptr_");
- writer.print(cSym.getName());
+ writer.print(getNativeName());
writer.println(";");
}
@@ -158,10 +158,8 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
if (callThroughProcAddress) {
// set the function pointer to the value of the passed-in procAddress
- final FunctionSymbol cSym = getBinding().getCSymbol();
-
// See above notes in emitBodyVariableDeclarations(..)!
- final String funcPointerTypedefBaseName = emitter.getFunctionPointerTypedefName(cSym);
+ final String funcPointerTypedefBaseName = emitter.getFunctionPointerTypedefName(binding.getCSymbol());
final String funcPointerTypedefLocalName = "_local_" + funcPointerTypedefBaseName;
final String funcPointerTypedefName;
if (hasProcAddrTypedef) {
@@ -170,7 +168,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
funcPointerTypedefName = funcPointerTypedefLocalName;
}
- final String ptrVarName = "ptr_" + cSym.getName();
+ final String ptrVarName = "ptr_" + getNativeName();
if (hasProcAddrTypedef) {
writer.println(" // implicit type validation of "+funcPointerTypedefLocalName+" -> "+funcPointerTypedefName);
@@ -214,7 +212,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
// call throught the run-time function pointer
writer.print("(* ptr_");
- writer.print(mBinding.getCSymbol().getName()); // use renamed base-name
+ writer.print(getNativeName());
writer.print(") ");
writer.print("(");
emitBodyPassCArguments(writer);