aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/JavaConfiguration.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-08-05 07:31:49 -0700
committerSven Gothel <[email protected]>2009-08-05 07:31:49 -0700
commitaac675e3ae8be73d3e498cc8f1062a20839f8482 (patch)
treedbf68c2183499179a28632b2d3dbc491e0f225dd /src/java/com/sun/gluegen/JavaConfiguration.java
parentedaf82f5a86cd3e239072608e5299a9553ece32c (diff)
Cleanup for a better OpenGL 3.2 integration,
for subsuming extensions: - Allow RenameExtensionIntoCore generate duplicate names, ie those will not be generated. - Add proper comment showing the extension of the symbol. - Fail if no 'GLHeader' is specified, but we are processing a GL/ProcAddress config - Fail if a GL function is not part of an extension MethodBinding, ConstantDefinition cleanup: - getName() returns the renamed name - getOrigName() returns the original - getAliasedNames() returns the aliased ones MethodBinding: - Change: equals() operates on renamed name - Add: hashCode() function - same criteria as equals() Impact: - All config options etc shall trigger with the renamed name, but ignore, rename etc. - Generated Java impl. uses the renamed base name as well Change: emitDefine() uses the ConstantDefinition Add: JavaConfiguration: dumpRenames() Change JavaConfiguration.shouldIgnoreInInterface/Impl(): - respect the renamed symbol name as well Change JavaEmitter.emitFunctions(): - only emit a generated MethodBinding once, therefor store emitted method bindings in a HashSet Fix BuildStaticGLInfo: - Allow white space at the end of #ifndef and #define - Trim strings - Allow 'const' qualifier in function pattern Fix GLEmitter: - Fail if no 'GLHeader' is specified, but a RenameIntoCore option .. - Don't emit marker defines, marking an extension (ie not part of an extension) Fix GLJavaMethodBindingEmitter: - Fail if a GL function is not part of an extension Fix PCPP: - Pass constant type qualifiers for hex-constants: 'l' 'L' ... Fix ProcAddressEmitter: - Operate on the aliased/renamed name for querying ProcAddress usage and generating code.
Diffstat (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java')
-rw-r--r--src/java/com/sun/gluegen/JavaConfiguration.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java
index a1fe732..636cef8 100644
--- a/src/java/com/sun/gluegen/JavaConfiguration.java
+++ b/src/java/com/sun/gluegen/JavaConfiguration.java
@@ -598,14 +598,23 @@ public class JavaConfiguration {
}
}
+ public void dumpRenames() {
+ System.err.println("Symbol Renames: ");
+ for (Iterator iter = javaSymbolRenames.keySet().iterator(); iter.hasNext(); ) {
+ String key = (String)iter.next();
+ System.err.println("\t"+key+" -> "+javaSymbolRenames.get(key));
+ }
+ }
+
/** Returns true if this #define, function, struct, or field within
a struct should be ignored during glue code generation. */
public boolean shouldIgnoreInInterface(String symbol) {
if(DEBUG_IGNORES) {
dumpIgnoresOnce();
}
- // Simple case; the entire symbol is in the interface ignore table.
- if (extendedIntfSymbolsIgnore.contains(symbol)) {
+ // Simple case; the entire symbol (orig or renamed) is in the interface ignore table
+ if (extendedIntfSymbolsIgnore.contains(symbol) ||
+ extendedIntfSymbolsIgnore.contains(getJavaSymbolRename(symbol))) {
if(DEBUG_IGNORES) {
System.err.println("Ignore Intf: "+symbol);
}
@@ -625,7 +634,8 @@ public class JavaConfiguration {
}
if (!extendedIntfSymbolsOnly.isEmpty()) {
- if(!extendedIntfSymbolsOnly.contains(symbol)) {
+ if(!extendedIntfSymbolsOnly.contains(symbol) &&
+ !extendedIntfSymbolsOnly.contains(getJavaSymbolRename(symbol))) {
if(DEBUG_IGNORES) {
System.err.println("Ignore Impl !extended: " + symbol);
}