#define IS_STRING 3
#define IS_ARRAY 4
#define IS_OBJECT 5
-#define IS_BC 6 /* for parser internal use only */
-#define IS_BOOL 7
-#define IS_RESOURCE 8
-#define IS_CONSTANT 9
+#define IS_BOOL 6
+#define IS_RESOURCE 7
+#define IS_CONSTANT 8
+
+/* Special data type to temporarily mark large numbers */
+#define FLAG_IS_BC 9 /* for parser internal use only */
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
case IS_LONG:
break;
#if WITH_BCMATH
- case IS_BC:
+ case FLAG_IS_BC:
op->type = IS_DOUBLE; /* may have lost significant digits */
break;
#endif
case IS_DOUBLE: \
case IS_LONG: \
break; \
- case IS_BC: \
+ case FLAG_IS_BC: \
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
break; \
default: \
if ((ret1=is_numeric_string(s1->value.str.val, s1->value.str.len, &lval1, &dval1)) &&
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2))) {
#if WITH_BCMATH
- if ((ret1==IS_BC) || (ret2==IS_BC)) {
+ if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
bc_num first, second;
/* use the BC math library to compare the numbers */
/* returns 0 for non-numeric string
* returns IS_DOUBLE for floating point string, and assigns the value to *dval (if it's not NULL)
* returns IS_LONG for integer strings, and assigns the value to *lval (if it's not NULL)
- * returns IS_BC if the number might lose accuracy when converted to a double
+ * returns FLAG_IS_BC if the number might lose accuracy when converted to a double
*/
#if 1
break;
}
}
- return IS_BC;
+ return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}