Re: [PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array bug24198.phpt

2003-06-17 Thread Andrei Zmievski
On Tue, 17 Jun 2003, Ilia A. wrote: > references since that field is always 0 no matter what. So, we rely on an > interesting property of refcount, which causes refcount to be odd when we > have a reference and even we simply have a write only copy. Can you explain the rationality behind this pr

Re: [PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array bug24198.phpt

2003-06-17 Thread Jon Parise
On Tue, Jun 17, 2003 at 10:24:46AM -0400, Ilia A. wrote: > The old check has a problem, because $b & $c are write only copies *src_entry > == *dest_entry condition is met and the function incorrectly terminates > claiming a circular reference. We cannot use is_ref field to verify > references s

Re: [PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array bug24198.phpt

2003-06-17 Thread Ilia A.
To allow us to do this: $a = array('a' => 1, 'b' => 2); $b = $a; $c = $a; array_merge_recursive($b, $c); The old check has a problem, because $b & $c are write only copies *src_entry == *dest_entry condition is met and the function incorrectly terminates claiming a circular reference. We cann

Re: [PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array bug24198.phpt

2003-06-17 Thread Andrei Zmievski
On Mon, 16 Jun 2003, Ilia Alshanetsky wrote: > + if (*src_entry == *dest_entry && > ((*dest_entry)->refcount % 2)) { Why this %2 test? -Andrei For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken -- PHP CVS Mailin

[PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array bug24198.phpt

2003-06-16 Thread Ilia Alshanetsky
iliaa Mon Jun 16 13:35:16 2003 EDT Added files: /php4/ext/standard/tests/array bug24198.phpt Modified files: /php4/ext/standard array.c Log: Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive()) Index: php4

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-06-12 Thread Andrey Hristov
andrey Thu Jun 12 11:11:11 2003 EDT Modified files: /php4/ext/standard array.c Log: silly bug Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.232 php4/ext/standard/array.c:1.233 --- php4/ext/standard/array.c:1.232 Tue Jun 10 16:03:37 2

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-06-06 Thread Sterling Hughes
sterlingThu Jun 5 09:58:15 2003 EDT Modified files: /php4/ext/standard array.c Log: fix array_key_exists() from HANDLE_NUMERIC() changes # need to go through this file and find any stuff that relies on this # change Index: php4/ext/standard/

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-04-03 Thread Sara Golemon
pollita Thu Apr 3 13:33:05 2003 EDT Modified files: /php4/ext/standard array.c Log: Kludgy fix for floating point drift causing problems like range(1.0,1.5,0.1) == array(1.0,1.1,1.2,1.3,1.4); Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-04-01 Thread Rasmus Lerdorf
rasmus Tue Apr 1 16:47:21 2003 EDT Modified files: /php4/ext/standard array.c Log: MFB Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.223 php4/ext/standard/array.c:1.224 --- php4/ext/standard/array.c:1.223 Thu Mar 27 13:57:53 2003

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-03-27 Thread Ilia Alshanetsky
iliaa Thu Mar 27 13:57:53 2003 EDT Modified files: /php4/ext/standard array.c Log: CS Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.222 php4/ext/standard/array.c:1.223 --- php4/ext/standard/array.c:1.222 Sat Feb 22 08:55:11 2003 +

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-02-22 Thread Andrey Hristov
andrey Sat Feb 22 08:55:12 2003 EDT Modified files: /php4/ext/standard array.c Log: additional speedup for array_shift(). No need to rehash if the removed element's key is not scalar and elements with scalar keys are already well numbered (sequentially from 0

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-02-22 Thread Andrey Hristov
andrey Sat Feb 22 05:54:27 2003 EDT Modified files: /php4/ext/standard array.c Log: rehash only in case something is changed. #lowers the execution time in half on my machine on array with 1000 elements #with nonscalar keys. Maybe it can be optimized further.

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-02-06 Thread Jani Taskinen
sniper Thu Feb 6 10:27:53 2003 EDT Modified files: /php4/ext/standard array.c Log: - Fixed bug #22088 (array_shift() leaves next index to be +1 too much) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.219 php4/ext/standard/array.c:1.220

[PHP-CVS] cvs: php4 /ext/standard array.c basic_functions.c php_array.h

2003-02-05 Thread Ilia Alshanetsky
iliaa Wed Feb 5 12:56:08 2003 EDT Modified files: /php4/ext/standard php_array.h basic_functions.c array.c Log: Added array_walk_recursive() function that can apply array_walk recursively to an array. Index: php4/ext/standard/php_array.h diff -u php4/ex

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-02-03 Thread Jani Taskinen
sniper Mon Feb 3 11:57:02 2003 EDT Modified files: /php4/ext/standard array.c Log: - Fixed bug: #21998 (array_pop() did not reset the current array position) # This behaves now same as in PHP 4.2.3 Index: php4/ext/standard/array.c diff -u php4/ext/standa

[PHP-CVS] cvs: php4 /ext/standard array.c assert.c browscap.c html.c

2003-01-24 Thread Ilia Alshanetsky
iliaa Fri Jan 24 11:29:40 2003 EDT Modified files: /php4/ext/standard array.c assert.c browscap.c html.c Log: zend_error -> php_error_docref. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.216 php4/ext/standard/array.c:1.217 --- php4/

[PHP-CVS] cvs: php4 /ext/standard array.c basic_functions.c php_array.h

2003-01-13 Thread Andrey Hristov
andrey Mon Jan 13 13:12:23 2003 EDT Modified files: /php4/ext/standard array.c basic_functions.c php_array.h Log: added array_combine(). Creates an array by using the elements of the first parameter as keys and the elements of the second as correspoding keys

[PHP-CVS] cvs: php4 /ext/standard array.c

2003-01-02 Thread Moriyoshi Koizumi
moriyoshi Fri Jan 3 00:05:13 2003 EDT Modified files: /php4/ext/standard array.c Log: Fixed small leaks in array_map() in case the first parameter is NULL like array_map(NULL, array(...)); Index: php4/ext/standard/array.c diff -u php4/ext/standard/a

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-25 Thread Ilia Alshanetsky
iliaa Wed Dec 25 15:02:03 2002 EDT Modified files: /php4/ext/standard array.c Log: Make range operate on the copies of the parameters rather then modify the actual parameters. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.211 php4

[PHP-CVS] cvs: php4 /ext/standard array.c /ext/standard/tests/array range.phpt

2002-12-20 Thread Ilia Alshanetsky
iliaa Fri Dec 20 12:16:32 2002 EDT Added files: /php4/ext/standard/tests/array range.phpt Modified files: /php4/ext/standard array.c Log: When low & high are the same return an array containing the low value. Added support for flo

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-09 Thread Moriyoshi Koizumi
moriyoshi Mon Dec 9 10:54:38 2002 EDT Modified files: /php4/ext/standard array.c Log: @- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.209 php4/ext/sta

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-06 Thread Andrey Hristov
- Original Message - From: "Ilia A." <[EMAIL PROTECTED]> To: "Andrey Hristov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 8:00 PM Subject: Re: [PHP-CVS] cvs: php4 /ext/standard array.c > On December 6, 2002 12:53 pm, A

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-06 Thread Ilia A.
t regards > Andrey Hristov > > > - Original Message - > From: "Ilia Alshanetsky" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, December 06, 2002 7:35 PM > Subject: [PHP-CVS] cvs: php4 /ext/standard array.c > > > iliaa Fri

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-06 Thread Andrey Hristov
is it ok to have NULL keys in the arrays? Best regards Andrey Hristov - Original Message - From: "Ilia Alshanetsky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 7:35 PM Subject: [PHP-CVS] cvs: php4 /ext/standard array.c > iliaa

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-06 Thread Ilia Alshanetsky
iliaa Fri Dec 6 12:35:52 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed bug #20865, array_key_exists() could not locate NULL keys. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.208 php4/ext/standard/array.c:1.209 ---

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi Wed Dec 4 11:41:29 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed segfaults of array_walk() when keys are passed to cb by reference. Fixed bug #12776. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-03 Thread Moriyoshi Koizumi
moriyoshi Tue Dec 3 10:02:07 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed leaks in array_walk() Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.205 php4/ext/standard/array.c:1.206 --- php4/ext/standard/array.c:1.

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-26 Thread Moriyoshi Koizumi
moriyoshi Tue Nov 26 17:12:40 2002 EDT Modified files: /php4/ext/standard array.c Log: Improved the error reporting portion of array_walk() as suggested by Markus Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.204 php4/ext/standar

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-26 Thread Moriyoshi Koizumi
moriyoshi Tue Nov 26 16:51:37 2002 EDT Modified files: /php4/ext/standard array.c Log: Prevent too many error reports from being displayed Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.203 php4/ext/standard/array.c:1.204 --- php4

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-26 Thread Moriyoshi Koizumi
moriyoshi Tue Nov 26 16:21:33 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed incorrect error messages of array_walk() in case the callback is specified in an array form Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-23 Thread Moriyoshi Koizumi
Just a notice: The third optional parameter is not suggested in the branch. Therefore I won't try to merge this patch to PHP_4_3, but due to this decision the behaviour of the function slightly differs one another in the cases like range("A", "Ä"); Moriyoshi "Moriyoshi Koizumi" <[EMAIL PROTECT

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-23 Thread Moriyoshi Koizumi
moriyoshi Sat Nov 23 06:27:56 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed some odd behaviours of range() Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.201 php4/ext/standard/array.c:1.202 --- php4/ext/standard/

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-14 Thread Moriyoshi Koizumi
moriyoshi Thu Nov 14 21:16:41 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed bug #20381 Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.200 php4/ext/standard/array.c:1.201 --- php4/ext/standard/array.c:1.200 Thu

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-13 Thread Jon Parise
jon Thu Nov 14 00:46:10 2002 EDT Modified files: /php4/ext/standard array.c Log: @- Added an optional "step" parameter to range(). (Jon) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.199 php4/ext/standard/array.c:1.200 --- php4/ext

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-11-05 Thread Ilia Alshanetsky
iliaa Tue Nov 5 11:19:20 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed a memory leak in array_fill(). The refcount hack is now done for ZE1 only and is slightly faster then the original. After this patch array_fill() can consistently crea

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-10 Thread Sterling Hughes
sterlingThu Oct 10 15:24:46 2002 EDT Modified files: /php4/ext/standard array.c Log: revert patch Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.196 php4/ext/standard/array.c:1.197 --- php4/ext/standard/array.c:1.196 Wed Oc

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Sterling Hughes
On Wed, 2002-10-09 at 22:56, Derick Rethans wrote: > On Wed, 9 Oct 2002, Andi Gutmans wrote: > > > At 10:35 PM 10/9/2002 +0200, Sterling Hughes wrote: > > >On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > > > > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > > > > sterl

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Derick Rethans
On Wed, 9 Oct 2002, Andi Gutmans wrote: > At 10:35 PM 10/9/2002 +0200, Sterling Hughes wrote: > >On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > > > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > > > sterlingWed Oct 9 14:29:45 2002 EDT > > > > > > > > M

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Sterling Hughes
On Wed, 2002-10-09 at 22:45, Derick Rethans wrote: > On 9 Oct 2002, Sterling Hughes wrote: > > > On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > > > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > > > sterlingWed Oct 9 14:29:45 2002 EDT > > > > > > >

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Andi Gutmans
At 10:35 PM 10/9/2002 +0200, Sterling Hughes wrote: >On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > > sterlingWed Oct 9 14:29:45 2002 EDT > > > > > > Modified files: > > > /php4/ext/standard arra

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Derick Rethans
On 9 Oct 2002, Sterling Hughes wrote: > On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > > sterling Wed Oct 9 14:29:45 2002 EDT > > > > > > Modified files: > > > /php4/ext/standardarray

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Sterling Hughes
On Wed, 2002-10-09 at 22:21, Thies C. Arntzen wrote: > On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > > sterlingWed Oct 9 14:29:45 2002 EDT > > > > Modified files: > > /php4/ext/standard array.c > > Log: > > clean these functions up u

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Thies C. Arntzen
On Wed, Oct 09, 2002 at 06:29:45PM -, Sterling Hughes wrote: > sterling Wed Oct 9 14:29:45 2002 EDT > > Modified files: > /php4/ext/standardarray.c > Log: > clean these functions up using zend_parse_parameters and nuke the use of > HASH_OF() w

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Sterling Hughes
sterlingWed Oct 9 14:29:45 2002 EDT Modified files: /php4/ext/standard array.c Log: clean these functions up using zend_parse_parameters and nuke the use of HASH_OF() which is inappropriate in these cases... Index: php4/ext/standard/array.c diff

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-10-09 Thread Sterling Hughes
sterlingWed Oct 9 13:15:57 2002 EDT Modified files: /php4/ext/standard array.c Log: small cleanups... Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.194 php4/ext/standard/array.c:1.195 --- php4/ext/standard/array.c:1.194 S

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-21 Thread Andrey Hristov
andrey Sat Sep 21 12:10:33 2002 EDT Modified files: /php4/ext/standard array.c Log: ws fixes. #hope not to be flamed :) what a wonderful day. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.193 php4/ext/standard/array.c:1.194 --- p

[PHP-CVS] cvs: php4 /ext/standard array.c basic_functions.c php_array.h

2002-09-21 Thread Andrey Hristov
andrey Sat Sep 21 10:50:04 2002 EDT Modified files: /php4/ext/standard array.c php_array.h basic_functions.c Log: New function added - array_intersect_assoc() similar to array_intersect() but the keys are also used in the comparison. So the result is a subset

Re: [PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-12 Thread Edin Kadribasic
On Thu, 12 Sep 2002 08:20:37 - "Andrey Hristov" <[EMAIL PROTECTED]> wrote: > andreyThu Sep 12 04:20:37 2002 EDT > > Modified files: > /php4/ext/standardarray.c > Log: > Fixing my zts fix. > #Sorry Edin That's ok. The trick is that INTERNAL_F

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-12 Thread Andrey Hristov
andrey Thu Sep 12 04:20:37 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixing my zts fix. #Sorry Edin Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.191 php4/ext/standard/array.c:1.192 --- php4/ext/standard/array.c:1.19

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-12 Thread Andrey Hristov
andrey Thu Sep 12 04:04:43 2002 EDT Modified files: /php4/ext/standard array.c Log: Removed magic numbers about the behavior of php_array_diff - proposed by Andi and Jon Parise. #It is strange that I commited ZTS code but after that Edin fixed ZTS build #w

Re: [PHP-CVS] cvs: php4 /ext/standard array.c basic_functions.c php_array.h

2002-09-11 Thread Andi Gutmans
You're better off changing the name of behavior to check_if_key_equal and use it as a boolean. if (check_if_key_equal) if (!check_if_key_equal) It'll be much more readable than a magic variable called behavior. If you want to keep the behavior variable you should probably make the 0 and 1 #def

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-11 Thread Edin Kadribasic
edink Wed Sep 11 19:09:12 2002 EDT Modified files: /php4/ext/standard array.c Log: Fix ZTS build. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.189 php4/ext/standard/array.c:1.190 --- php4/ext/standard/array.c:1.189 Wed Sep 11 1

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-11 Thread Derick Rethans
derick Wed Sep 11 14:40:56 2002 EDT Modified files: /php4/ext/standard array.c Log: - Little whitespace changes Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.188 php4/ext/standard/array.c:1.189 --- php4/ext/standard/array.c:1.188

[PHP-CVS] cvs: php4 /ext/standard array.c basic_functions.c php_array.h

2002-09-11 Thread Andrey Hristov
andrey Wed Sep 11 14:13:48 2002 EDT Modified files: /php4/ext/standard array.c basic_functions.c php_array.h Log: New function added : array_diff_assoc() . Like array_diff() but does additional checks on key values. Test script will be added too. #My first p

[PHP-CVS] cvs: php4 /ext/standard array.c php_array.h

2002-09-10 Thread Edin Kadribasic
edink Tue Sep 10 18:36:44 2002 EDT Modified files: /php4/ext/standard array.c php_array.h Log: Fixed ZTS build. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.186 php4/ext/standard/array.c:1.187 --- php4/ext/standard/array.c:1.186

[PHP-CVS] cvs: php4 /ext/standard array.c php_array.h

2002-09-10 Thread Andrei Zmievski
andrei Tue Sep 10 14:34:17 2002 EDT Modified files: /php4/ext/standard array.c php_array.h Log: @- Fixed array_merge_recursive() to avoid problems with merging cyclical @ arrays (bug #16064). (Andrei) Index: php4/ext/standard/array.c diff -u php4/ext/st

[PHP-CVS] cvs: php4 /ext/standard array.c

2002-09-09 Thread Andrei Zmievski
andrei Mon Sep 9 16:05:23 2002 EDT Modified files: /php4/ext/standard array.c Log: @- Added ability to extract() variables as references via OR'able EXTR_REFS @ flag. (Andrei) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.184 php