diff options
author | Sven Gothel <[email protected]> | 2015-03-05 08:14:19 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-05 08:14:19 +0100 |
commit | ea6df88075c44f6b6317920119d6b33d5d97b362 (patch) | |
tree | 099a24d889dfe5c0525e43541e1c297f3cbba9f8 /src/java/com/jogamp/gluegen/cgram | |
parent | 72d3635279ffc8ad88e47dff9bbe95d211226d11 (diff) |
Bug 1134 - Fix regression: Static C-Function call must use original API name
- Regression of commit 72d3635279ffc8ad88e47dff9bbe95d211226d11
CMethodBindingEmitter emits statically linked function calls,
hence needs to use the original name of AliasedSymbol.
AliasedSymbol: Add 'getOrigName()' at creation!
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java | 19 | ||||
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/CompoundType.java | 5 |
2 files changed, 22 insertions, 2 deletions
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. |