mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
- Rename IS_BC to FLAG_IS_BC. We will probably nuke it.
This commit is contained in:
parent
af22085c51
commit
44e9e95933
10
Zend/zend.h
10
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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user