diff options
author | Sven Gothel <[email protected]> | 2015-03-11 15:10:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-11 15:10:15 +0100 |
commit | bbea09816015ecf3596acdcc033553127fcc0ef3 (patch) | |
tree | ab38152b5b74ee7d99e955658c7778de4181438b /src/java/com/jogamp/gluegen/cgram | |
parent | 25f248669f603c2bbd6ad97f31e0c72ce780f507 (diff) |
Bug 1144 - Add 'DelegateImplementation': Requires own MethodBinding for delegates impl. / Adding ReturnsOpaque
- DelegateImplementation requires own MethodBinding for delegates impl.
The delegation name must be included within
the FunctionSymbol's aliases _only_ for implementations,
where delegation applies.
This allows all subsequent type/cfg checks to hit on AliasedSymbol!
Hence we need to create individual MethodBinding instances
for interfaces and public/private implementations.
- Adding ReturnsOpaque
Configuration:
ReturnsOpaque <Primitive Java Type> <Function Name>
This feature is necessary to achieve 'Opaque' functionality
for function's return type - instead of types in general.
- Fix AliasedSymbolImpl copy-ctor, i.e. this.name = o.name !
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java | 2 | ||||
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java index 73c65ef..869c658 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java +++ b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java @@ -110,7 +110,7 @@ public interface AliasedSymbol { public AliasedSymbolImpl(final AliasedSymbolImpl o) { this.origName = o.origName; this.aliasedNames = new HashSet<String>(o.aliasedNames); - this.name = o.origName; + this.name = o.name; } @Override public void rename(final String newName) { diff --git a/src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java b/src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java index 55585fc..91a0a5a 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java +++ b/src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java @@ -76,6 +76,17 @@ public class FunctionSymbol extends AliasedSymbolImpl implements AliasedSemantic this.astLocus = locus; } + /** Shallow'ish copy, only aliased names are re-created. */ + public static FunctionSymbol cloneWithDeepAliases(final FunctionSymbol o) { + return new FunctionSymbol(o); + } + /** Warning: Shallow'ish copy, only aliased names are re-created. */ + private FunctionSymbol(final FunctionSymbol o) { + super(o); + this.type = o.type; + this.astLocus = o.astLocus; + } + @Override public ASTLocusTag getASTLocusTag() { return astLocus; } |