summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-01-05 20:31:54 +0000
committerFelipe Pena <felipe@php.net>2009-01-05 20:31:54 +0000
commitf8689552a4c7b210bbfef59a4a74dfb34bf809c4 (patch)
tree6cad23dc4fdcc339bf38d6b7793cf915fe0108e5 /Zend/zend_operators.c
parentf0240a0382c7ac38144543965f7c45e57af54665 (diff)
downloadphp-git-f8689552a4c7b210bbfef59a4a74dfb34bf809c4.tar.gz
MFH:
- Fixed bug #46701 (Creating associative array with long values in the key fails on 32bit linux) Patch by Shire
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index c125525dce..57e4e7f5ab 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -211,40 +211,6 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
} \
}
-#define MAX_UNSIGNED_INT ((double) LONG_MAX * 2) + 1
-#ifdef _WIN64
-# define DVAL_TO_LVAL(d, l) \
- if ((d) > LONG_MAX) { \
- (l) = (long)(unsigned long)(__int64) (d); \
- } else { \
- (l) = (long) (d); \
- }
-#elif !defined(_WIN64) && __WORDSIZE == 64
-# define DVAL_TO_LVAL(d, l) \
- if ((d) >= LONG_MAX) { \
- (l) = LONG_MAX; \
- } else if ((d) <= LONG_MIN) { \
- (l) = LONG_MIN; \
- } else {\
- (l) = (long) (d); \
- }
-#else
-# define DVAL_TO_LVAL(d, l) \
- if ((d) > LONG_MAX) { \
- if ((d) > MAX_UNSIGNED_INT) { \
- (l) = LONG_MAX; \
- } else { \
- (l) = (unsigned long) (d); \
- } \
- } else { \
- if((d) < LONG_MIN) { \
- (l) = LONG_MIN; \
- } else { \
- (l) = (long) (d); \
- } \
- }
-#endif
-
#define zendi_convert_to_long(op, holder, result) \
if (op == result) { \