]> granicus.if.org Git - php/commitdiff
- Rename IS_BC to FLAG_IS_BC. We will probably nuke it.
authorAndi Gutmans <andi@php.net>
Tue, 4 Jan 2000 14:25:42 +0000 (14:25 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 4 Jan 2000 14:25:42 +0000 (14:25 +0000)
Zend/zend.h
Zend/zend_operators.c

index 7df3c5dd58b64dff453858b85d96819e449ff20c..34cdab42129016032a1da81c6571eb5218aac19f 100644 (file)
@@ -210,10 +210,12 @@ typedef struct _zend_utility_values {
 #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)
index 38c54a242d326ca0a6dd58f096cd57a91f486822..e8c7f2c801814f34b35d3de40adccb7dafdf6e3c 100644 (file)
@@ -48,7 +48,7 @@ ZEND_API void convert_scalar_to_number(zval *op)
                        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
@@ -74,7 +74,7 @@ ZEND_API void convert_scalar_to_number(zval *op)
                        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:                                                                                                \
@@ -1264,7 +1264,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
        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 */
@@ -1301,7 +1301,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
 /* 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
@@ -1345,7 +1345,7 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
                                                break;
                                }
                        }
-                       return IS_BC;
+                       return FLAG_IS_BC;
                } else {
                        return IS_DOUBLE;
                }