cvs: ZendEngine2 / zend_operators.c

From: Date: Wed, 27 Sep 2006 15:40:09 +0000
Subject: cvs: ZendEngine2 / zend_operators.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5273@lists.php.net to get a copy of this message
tony2001 Wed Sep 27 15:40:09 2006 UTC Modified files: /ZendEngine2 zend_operators.c Log: use if() instead of ?: and avoid possible optimization problems http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.c?r1=1.255&r2=1.256&diff_format=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.255 ZendEngine2/zend_operators.c:1.256 --- ZendEngine2/zend_operators.c:1.255 Tue Sep 19 10:38:30 2006 +++ ZendEngine2/zend_operators.c Wed Sep 27 15:40:09 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.255 2006/09/19 10:38:30 dmitry Exp $ */ +/* $Id: zend_operators.c,v 1.256 2006/09/27 15:40:09 tony2001 Exp $ */ #include <ctype.h> @@ -221,8 +221,13 @@ } \ } +#define DVAL_TO_LVAL(d, l) \ + if ((d) > LONG_MAX) { \ + (l) = (unsigned long) (d); \ + } else { \ + (l) = (long) (d); \ + } -#define DVAL_TO_LVAL(d, l) (l) = (((d) > LONG_MAX) ? (unsigned long) (d) : (long) (d)) #define zendi_convert_to_long(op, holder, result) \ if (op == result) { \

« previous php.zend-engine.cvs (#5273) next »