Re: cvs: php4 /ext/standard array.c

From: Date: Wed, 24 Apr 2002 16:18:54 +0000
Subject: Re: cvs: php4 /ext/standard array.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11398@lists.php.net to get a copy of this message
I did. On Wed, 24 Apr 2002, Thies C. Arntzen wrote: > MFH? > On Wed, Apr 24, 2002 at 03:23:43PM -0000, Andrei Zmievski wrote: > > andrei Wed Apr 24 11:23:43 2002 EDT > > > > Modified files: > > /php4/ext/standard array.c > > Log: > > Fix Bug #14795. > > > > > > Index: php4/ext/standard/array.c > > diff -u php4/ext/standard/array.c:1.160 php4/ext/standard/array.c:1.161 > > --- php4/ext/standard/array.c:1.160 Wed Apr 24 11:01:53 2002 > > +++ php4/ext/standard/array.c Wed Apr 24 11:23:43 2002 > > @@ -21,7 +21,7 @@ > > +----------------------------------------------------------------------+ > > */ > > > > -/* $Id: array.c,v 1.160 2002/04/24 15:01:53 andrei Exp $ */ > > +/* $Id: array.c,v 1.161 2002/04/24 15:23:43 andrei Exp $ */ > > > > #include "php.h" > > #include "php_ini.h" > > @@ -2924,7 +2924,8 @@ > > PHP_FUNCTION(array_sum) > > { > > zval **input, > > - **entry; > > + **entry, > > + entry_n; > > int argc = ZEND_NUM_ARGS(); > > HashPosition pos; > > double dval; > > @@ -2948,19 +2949,20 @@ > > if (Z_TYPE_PP(entry) == IS_ARRAY || Z_TYPE_PP(entry) == IS_OBJECT) > > continue; > > > > - SEPARATE_ZVAL(entry); > > - convert_scalar_to_number(*entry TSRMLS_CC); > > + entry_n = **entry; > > + zval_copy_ctor(&entry_n); > > + convert_scalar_to_number(&entry_n TSRMLS_CC); > > > > - if (Z_TYPE_PP(entry) == IS_LONG && Z_TYPE_P(return_value) == IS_LONG) { > > - dval = (double)Z_LVAL_P(return_value) + (double)Z_LVAL_PP(entry); > > + if (Z_TYPE(entry_n) == IS_LONG && Z_TYPE_P(return_value) == IS_LONG) { > > + dval = (double)Z_LVAL_P(return_value) + (double)Z_LVAL(entry_n); > > if ( (double)LONG_MIN <= dval && dval <= (double)LONG_MAX ) { > > - Z_LVAL_P(return_value) += Z_LVAL_PP(entry); > > + Z_LVAL_P(return_value) += Z_LVAL(entry_n); > > continue; > > } > > } > > convert_to_double(return_value); > > - convert_to_double_ex(entry); > > - Z_DVAL_P(return_value) += Z_DVAL_PP(entry); > > + convert_to_double(&entry_n); > > + Z_DVAL_P(return_value) += Z_DVAL(entry_n); > > } > > } > > > > > > > > > > -- > > PHP CVS Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php -Andrei * E Pluribus UNIX. *

« previous php.cvs (#11398) next »