From: Andi Gutmans Date: Tue, 4 Jan 2000 14:25:42 +0000 (+0000) Subject: - Rename IS_BC to FLAG_IS_BC. We will probably nuke it. X-Git-Tag: BEFORE_PRE_SHUTDOWN_REVERSE_PATCH~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44e9e9593370081898f6efbd8321ee876d1fc0ab;p=php - Rename IS_BC to FLAG_IS_BC. We will probably nuke it. --- diff --git a/Zend/zend.h b/Zend/zend.h index 7df3c5dd58..34cdab4212 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -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) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 38c54a242d..e8c7f2c801 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -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; }