summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/gluegen/ConstantDefinition.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/ConstantDefinition.java b/src/java/com/jogamp/gluegen/ConstantDefinition.java
index d579da1..f9296a7 100644
--- a/src/java/com/jogamp/gluegen/ConstantDefinition.java
+++ b/src/java/com/jogamp/gluegen/ConstantDefinition.java
@@ -129,6 +129,7 @@ public class ConstantDefinition extends AliasedSymbolImpl implements AliasedSema
return String.valueOf(f) + ( !isDouble ? "f" : "");
}
}
+ @Override
public final String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("[");
@@ -506,8 +507,9 @@ public class ConstantDefinition extends AliasedSymbolImpl implements AliasedSema
}
// Find constant expressions like (1 << 3)
// if found just pass them through, they will most likely work in java too
- // expressions containing identifiers are currently ignored (casts too)
- final String[] values = value.split("[\\s\\(\\)]"); // [ whitespace '(' ')' ]
+ // expressions containing identifiers are currently ignored (casts too).
+ // The pattern includes 'patternCPPOperand', i.e. all supported operands used for constant-expression of define macros
+ final String[] values = value.split("[\\s\\+\\-\\*\\/\\|\\&\\(\\)]|(\\<\\<)|(\\>\\>)|(\\~)"); // [ whitespace '(' ')' ]
int numberCount = 0;
for (final String s : values) {
if( s.length() > 0 ) {