Date: 09/17/01
- Next message: alester <email protected>: "[PHP-DEV] Bug #13347: Implode on $foo[] instead of $foo seems to make PHP give up"
- Previous message: dacota <email protected>: "[PHP-DEV] Bug #12853 Updated: Crash when open_file_for_scanning is adding handle to CG(open_files)"
- Next in thread: Thies C. Arntzen: "Re: [PHP-DEV] [patch] avoiding TSRMLS_FETCH (custom sorting functions)"
- Reply: Thies C. Arntzen: "Re: [PHP-DEV] [patch] avoiding TSRMLS_FETCH (custom sorting functions)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey,
Attached is a patch which replaces the use of libc's quicksort
and uses our own custom quicksort for quicksort sorting, giving
the immediate benefit of allowing us to pass TSRMLS_CC to the callbacks,
and avoid a TSRMLS_FETCH(). The patch also applies the changes to
our mergesort implementation.
I've put the function in a seperate file in Zend, zend_qsort.c
(instead of as a file in php4/main) for two reasons:
1) qsort() is used by Zend
2) its a fairly common function, and re-implemented in order to play
nice with Zend's TS mechanism, this should be made available to all
programs using Zend.
Comments are appreciated and welcome... I'll commit after an
appropriate mourning period if no one speaks up.
-Sterling
- TEXT/PLAIN attachment: qsort.diff
- TEXT/PLAIN attachment: zend_qsort.c
- TEXT/PLAIN attachment: zend_qsort.h
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: alester <email protected>: "[PHP-DEV] Bug #13347: Implode on $foo[] instead of $foo seems to make PHP give up"
- Previous message: dacota <email protected>: "[PHP-DEV] Bug #12853 Updated: Crash when open_file_for_scanning is adding handle to CG(open_files)"
- Next in thread: Thies C. Arntzen: "Re: [PHP-DEV] [patch] avoiding TSRMLS_FETCH (custom sorting functions)"
- Reply: Thies C. Arntzen: "Re: [PHP-DEV] [patch] avoiding TSRMLS_FETCH (custom sorting functions)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

