aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
diff options
context:
space:
mode:
authorWade Walker <[email protected]>2018-12-26 11:04:16 -0600
committerSven Gothel <[email protected]>2019-08-16 23:58:53 +0200
commit93121714758f89a394993f0740c6929f48fb887b (patch)
tree695ad902e210de1efe6d4813f6239e2aa4dadc20 /src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
parent3ae05eacc091282f009792e2b06505efe96cca7d (diff)
Fixed CStruct annotation processor to not use dummy Java variable types
When annotations were placed on dummy Java variables, the annotation processor was emitting a RenameJavaType directive into the gluegen config file that caused the emitted file to be named boolean.java instead of RenderingConfig.java or Pixel.java. Turned off this behavior when jname is given in the @CStruct annotation. I'm uncertain how much this processor is even used, since I can't find any occurrences of @CStruct outside the test code for it in gluegen.
Diffstat (limited to 'src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java')
-rw-r--r--src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
index 2fc0766..45293f8 100644
--- a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
+++ b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
@@ -249,7 +249,7 @@ public class CStructAnnotationProcessor extends AbstractProcessor {
writer = new FileWriter(configFile);
writer.write("Package "+pakage+"\n");
writer.write("EmitStruct "+structName+"\n");
- if( finalType != structName ) {
+ if( !useJavaName && (finalType != structName) ) {
// We allow renaming the structType to the element's declaredType (FIELD annotation only)
writer.write("RenameJavaType " + struct.name()+" " + declaredType +"\n");
}