diff options
| author | Sascha Schumann <sas@php.net> | 2000-06-13 17:58:33 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2000-06-13 17:58:33 +0000 |
| commit | df74f1dfabafb515bdf8ffee5f989761c0d6604d (patch) | |
| tree | 208700924af318225292a4982e9fc0ac2dda7c19 /Zend/zend_operators.c | |
| parent | 307a234879aad2f47e00e158f9a424b9531c5879 (diff) | |
| download | php-git-df74f1dfabafb515bdf8ffee5f989761c0d6604d.tar.gz | |
Add optional support for C0x inline semantics.
These are enabled by specifying `--enable-c0x-inline' on the command
line. We might add an autoconf check for this particular feature
later.
Diffstat (limited to 'Zend/zend_operators.c')
| -rw-r--r-- | Zend/zend_operators.c | 60 |
1 files changed, 1 insertions, 59 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index cfa40d50bc..b21496305a 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1589,65 +1589,7 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2) * returns FLAG_IS_BC if the number might lose accuracy when converted to a double */ -#if 1 -ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval) -{ - long local_lval; - double local_dval; - char *end_ptr; - - if (!length) { - return 0; - } - - errno=0; - local_lval = strtol(str, &end_ptr, 10); - if (errno!=ERANGE && end_ptr == str+length) { /* integer string */ - if (lval) { - *lval = local_lval; - } - return IS_LONG; - } - - errno=0; - local_dval = strtod(str, &end_ptr); - if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */ - if (! finite(local_dval)) { - /* "inf","nan" and maybe other weird ones */ - return 0; - } - - if (dval) { - *dval = local_dval; - } -#if WITH_BCMATH - if (length>16) { - register char *ptr=str, *end=str+length; - - while(ptr<end) { - switch(*ptr++) { - case 'e': - case 'E': - /* scientific notation, not handled by the BC library */ - return IS_DOUBLE; - break; - default: - break; - } - } - return FLAG_IS_BC; - } else { - return IS_DOUBLE; - } -#else - return IS_DOUBLE; -#endif - } - - return 0; -} - -#else +#if 0 static inline int is_numeric_string(char *str, int length, long *lval, double *dval) { |
