santiagopg 2002/06/27 14:52:09
Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
Log:
Use doubles instead of longs for big ints.
Revision Changes Path
1.39 +4 -6
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup
Index: xpath.cup
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- xpath.cup 16 May 2002 14:35:19 -0000 1.38
+++ xpath.cup 27 Jun 2002 21:52:09 -0000 1.39
@@ -756,11 +756,9 @@
| INT:num
{:
- // bug fix 3592, num comes in as a Long rather than an Integer
- // see xpath.lex, {Digit}+ rule.
long value = num.longValue();
- if ((value < Integer.MIN_VALUE) || (value > Integer.MAX_VALUE)) {
- RESULT = new LongExpr(num.longValue());
+ if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
+ RESULT = new RealExpr(value);
}
else {
if (num.doubleValue() == -0)
@@ -769,7 +767,7 @@
RESULT = new IntExpr(num.intValue());
else if (num.doubleValue() == 0.0)
RESULT = new RealExpr(num.doubleValue());
- else
+ else
RESULT = new IntExpr(num.intValue());
}
:}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]