diff options
Diffstat (limited to 'src/java/com/jogamp/gluegen')
4 files changed, 24 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java index 734f536..1b1f2fa 100644 --- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java @@ -989,7 +989,7 @@ public class CMethodBindingEmitter extends FunctionEmitter { // Call through function pointer writer.print(CMethodBindingEmitter.cThisArgumentName() + "->"); } - writer.print(binding.getCSymbol().getName()); + writer.print(binding.getCSymbol().getOrigName()); // use original API name writer.print("("); emitBodyPassCArguments(writer); writer.println(");"); diff --git a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java index a924876..18477c1 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java +++ b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java @@ -63,6 +63,9 @@ public interface AliasedSymbol { /** * Return all aliases for this symbol, i.e. original names, for this symbol. * <p> + * Inclusive {@link #getOrigName() original-name}, if {@link #rename(String) renamed}, + * </p> + * <p> * Exclusive {@link #getName() current-name}. * </p> * <p> @@ -71,8 +74,12 @@ public interface AliasedSymbol { */ Set<String> getAliasedNames(); /** + * Return the original-name as set at creation. + */ + String getOrigName(); + /** * Return the current-name, which is the last {@link #rename(String) renamed-name} if issued, - * or the original-name. + * or the {@link #getOrigName() original-name}. */ String getName(); /** @@ -82,10 +89,12 @@ public interface AliasedSymbol { String getAliasedString(); public static class AliasedSymbolImpl implements AliasedSymbol { + private final String origName; private final HashSet<String> aliasedNames; private String name; public AliasedSymbolImpl(final String origName) { + this.origName = origName; this.aliasedNames=new HashSet<String>(); this.name = origName; } @@ -112,6 +121,10 @@ public interface AliasedSymbol { return aliasedNames; } @Override + public String getOrigName() { + return origName; + } + @Override public String getName() { return name; } @@ -143,6 +156,10 @@ public interface AliasedSymbol { return null; } @Override + public String getOrigName() { + return name; + } + @Override public String getName() { return name; } diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java index c3aca40..c9c4223 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java +++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java @@ -84,7 +84,10 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable public String getAliasedString() { return toString(); } - + @Override + public String getOrigName() { + return getName(); + } /** * @param structName struct name of this CompoundType, i.e. the "foo" in the construct {@code struct foo { int a, ... };} or {@code struct foo;} <i>even</i> for anonymous structs. diff --git a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java index abbe521..81aa96b 100644 --- a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java @@ -198,7 +198,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter { // call throught the run-time function pointer writer.print("(* ptr_"); - writer.print(mBinding.getCSymbol().getName()); + writer.print(mBinding.getCSymbol().getName()); // use renamed base-name writer.print(") "); writer.print("("); emitBodyPassCArguments(writer); |