[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sat Mar 1 01:31:30 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2973r2=1.2974diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2973 php-src/ChangeLog:1.2974 --- php-src/ChangeLog:1.2973Fri Feb 29 01:31:28 2008 +++ php-src/ChangeLog Sat Mar 1 01:31:29 2008 @@ -1,3 +1,26 @@ +2008-02-29 Etienne Kneuss [EMAIL PROTECTED] + +* (PHP_5_3) + ext/spl/php_spl.c + ext/spl/tests/bug40091.phpt: + MFH: Fix #44144 (object methods as spl autoload functions returned + correctly) + +* ext/spl/php_spl.c + ext/spl/tests/bug40091.phpt: + Fix #44144 (object methods as spl autoload functions returned correctly) + +* ext/spl/tests/heap_008.phpt + ext/spl/tests/pqueue_004.phpt: + Fix tests in non-unicode mode + +* (PHP_5_3) + NEWS: + Heaps addition + +* ext/spl/spl_heap.c: + Fix #44288 (Move declarations) + 2008-02-28 Felipe Pena [EMAIL PROTECTED] * ZendEngine2/zend_execute.c
[PHP-CVS] cvs: php-src /ext/spl spl_heap.c
colder Fri Feb 29 09:25:30 2008 UTC Modified files: /php-src/ext/splspl_heap.c Log: Fix #44288 (Move declarations) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_heap.c?r1=1.2r2=1.3diff_format=u Index: php-src/ext/spl/spl_heap.c diff -u php-src/ext/spl/spl_heap.c:1.2 php-src/ext/spl/spl_heap.c:1.3 --- php-src/ext/spl/spl_heap.c:1.2 Mon Feb 25 23:40:47 2008 +++ php-src/ext/spl/spl_heap.c Fri Feb 29 09:25:30 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_heap.c,v 1.2 2008/02/25 23:40:47 colder Exp $ */ +/* $Id: spl_heap.c,v 1.3 2008/02/29 09:25:30 colder Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -273,13 +273,15 @@ static spl_ptr_heap_element spl_ptr_heap_delete_top(spl_ptr_heap *heap, void *cmp_userdata TSRMLS_DC) { /* {{{ */ int i, j; const int limit = (heap-count-1)/2; + spl_ptr_heap_element top; + spl_ptr_heap_element bottom; if (heap-count == 0) { return NULL; } - spl_ptr_heap_element top= heap-elements[0]; - spl_ptr_heap_element bottom = heap-elements[--heap-count]; + top= heap-elements[0]; + bottom = heap-elements[--heap-count]; for( i = 0; i limit; i = j) { @@ -920,13 +922,14 @@ { zval *object = (zval*)((zend_user_iterator *)iter)-it.data; spl_heap_it *iterator = (spl_heap_it *)iter; + spl_ptr_heap_element elem; if (iterator-object-heap-flags SPL_HEAP_CORRUPTED) { zend_throw_exception(spl_ce_RuntimeException, Heap is corrupted, heap properties are no longer ensured., 0 TSRMLS_CC); return; } - spl_ptr_heap_element elem = spl_ptr_heap_delete_top(iterator-object-heap, object TSRMLS_CC); + elem = spl_ptr_heap_delete_top(iterator-object-heap, object TSRMLS_CC); if (elem != NULL) { zval_ptr_dtor((zval **)elem); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c
colder Fri Feb 29 09:26:01 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c Log: MFH: Fix #44288 (Move declarations) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_heap.c?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/spl/spl_heap.c diff -u php-src/ext/spl/spl_heap.c:1.1.2.3 php-src/ext/spl/spl_heap.c:1.1.2.4 --- php-src/ext/spl/spl_heap.c:1.1.2.3 Mon Feb 25 23:41:04 2008 +++ php-src/ext/spl/spl_heap.c Fri Feb 29 09:26:01 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_heap.c,v 1.1.2.3 2008/02/25 23:41:04 colder Exp $ */ +/* $Id: spl_heap.c,v 1.1.2.4 2008/02/29 09:26:01 colder Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -273,13 +273,15 @@ static spl_ptr_heap_element spl_ptr_heap_delete_top(spl_ptr_heap *heap, void *cmp_userdata TSRMLS_DC) { /* {{{ */ int i, j; const int limit = (heap-count-1)/2; + spl_ptr_heap_element top; + spl_ptr_heap_element bottom; if (heap-count == 0) { return NULL; } - spl_ptr_heap_element top= heap-elements[0]; - spl_ptr_heap_element bottom = heap-elements[--heap-count]; + top= heap-elements[0]; + bottom = heap-elements[--heap-count]; for( i = 0; i limit; i = j) { @@ -920,13 +922,14 @@ { zval *object = (zval*)((zend_user_iterator *)iter)-it.data; spl_heap_it *iterator = (spl_heap_it *)iter; + spl_ptr_heap_element elem; if (iterator-object-heap-flags SPL_HEAP_CORRUPTED) { zend_throw_exception(spl_ce_RuntimeException, Heap is corrupted, heap properties are no longer ensured., 0 TSRMLS_CC); return; } - spl_ptr_heap_element elem = spl_ptr_heap_delete_top(iterator-object-heap, object TSRMLS_CC); + elem = spl_ptr_heap_delete_top(iterator-object-heap, object TSRMLS_CC); if (elem != NULL) { zval_ptr_dtor((zval **)elem); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
colder Fri Feb 29 09:42:24 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: Heaps addition http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.119r2=1.2027.2.547.2.965.2.120diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.119 php-src/NEWS:1.2027.2.547.2.965.2.120 --- php-src/NEWS:1.2027.2.547.2.965.2.119 Wed Feb 27 02:10:40 2008 +++ php-src/NEWSFri Feb 29 09:42:23 2008 @@ -44,6 +44,7 @@ . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne) . Added FilesystemIterator. (Marcus) . Added GlobIterator. (Marcus) + . Added SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue classes. (Etienne) - Add the ReflectionProperty::setAccessible() method that allows non-public property's values to be read through ::getValue(). (Derick) - Added ability to use Traversable objects instead of plain arrays in ext/soap. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests heap_008.phpt pqueue_004.phpt
colder Fri Feb 29 13:45:19 2008 UTC Modified files: /php-src/ext/spl/tests heap_008.phpt pqueue_004.phpt Log: Fix tests in non-unicode mode http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/heap_008.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/spl/tests/heap_008.phpt diff -u php-src/ext/spl/tests/heap_008.phpt:1.2 php-src/ext/spl/tests/heap_008.phpt:1.3 --- php-src/ext/spl/tests/heap_008.phpt:1.2 Thu Feb 28 15:40:34 2008 +++ php-src/ext/spl/tests/heap_008.phpt Fri Feb 29 13:45:19 2008 @@ -33,6 +33,7 @@ int(1) } } +===DONE=== --UEXPECTF-- object(SplMaxHeap)#1 (3) { [uflags:uSplHeap:private]= http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/pqueue_004.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/spl/tests/pqueue_004.phpt diff -u php-src/ext/spl/tests/pqueue_004.phpt:1.2 php-src/ext/spl/tests/pqueue_004.phpt:1.3 --- php-src/ext/spl/tests/pqueue_004.phpt:1.2 Thu Feb 28 15:40:34 2008 +++ php-src/ext/spl/tests/pqueue_004.phpt Fri Feb 29 13:45:19 2008 @@ -53,6 +53,7 @@ } } } +===DONE=== --UEXPECTF-- object(SplPriorityQueue)#1 (3) { [uflags:uSplPriorityQueue:private]= -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl php_spl.c /ext/spl/tests bug40091.phpt
colder Fri Feb 29 13:48:09 2008 UTC Modified files: /php-src/ext/splphp_spl.c /php-src/ext/spl/tests bug40091.phpt Log: Fix #44144 (object methods as spl autoload functions returned correctly) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.126r2=1.127diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.126 php-src/ext/spl/php_spl.c:1.127 --- php-src/ext/spl/php_spl.c:1.126 Mon Feb 25 23:36:36 2008 +++ php-src/ext/spl/php_spl.c Fri Feb 29 13:48:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.126 2008/02/25 23:36:36 colder Exp $ */ +/* $Id: php_spl.c,v 1.127 2008/02/29 13:48:09 colder Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -606,8 +606,9 @@ Return all registered __autoload() functionns */ PHP_FUNCTION(spl_autoload_functions) { - zend_function *fptr, **func_ptr_ptr; + zend_function *fptr; HashPosition function_pos; + autoload_func_info *alfi; if (!EG(autoload_func)) { if (zend_hash_find(EG(function_table), ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME), (void **) fptr) == SUCCESS) { @@ -624,17 +625,23 @@ array_init(return_value); zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), function_pos) == SUCCESS) { - zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) func_ptr_ptr, function_pos); - if ((*func_ptr_ptr)-common.scope) { + zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) alfi, function_pos); + if (alfi-func_ptr-common.scope) { zval *tmp; MAKE_STD_ZVAL(tmp); array_init(tmp); - add_next_index_text(tmp, (*func_ptr_ptr)-common.scope-name, 1); - add_next_index_text(tmp, (*func_ptr_ptr)-common.function_name, 1); + if (alfi-obj) { + Z_ADDREF_P(alfi-obj); + add_next_index_zval(tmp, alfi-obj); + } else { + add_next_index_text(tmp, alfi-ce-name, 1); + } + add_next_index_text(tmp, alfi-func_ptr-common.function_name, 1); add_next_index_zval(return_value, tmp); - } else - add_next_index_text(return_value, (*func_ptr_ptr)-common.function_name, 1); + } else { + add_next_index_text(return_value, alfi-func_ptr-common.function_name, 1); + } zend_hash_move_forward_ex(SPL_G(autoload_functions), function_pos); } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug40091.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/spl/tests/bug40091.phpt diff -u php-src/ext/spl/tests/bug40091.phpt:1.2 php-src/ext/spl/tests/bug40091.phpt:1.3 --- php-src/ext/spl/tests/bug40091.phpt:1.2 Tue Nov 6 15:29:32 2007 +++ php-src/ext/spl/tests/bug40091.phpt Fri Feb 29 13:48:09 2008 @@ -25,13 +25,19 @@ ( [0] = Array ( -[0] = MyAutoloader +[0] = MyAutoloader Object +( +) + [1] = autoload ) [1] = Array ( -[0] = MyAutoloader +[0] = MyAutoloader Object +( +) + [1] = autoload ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl php_spl.c /ext/spl/tests bug40091.phpt
colder Fri Feb 29 13:55:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splphp_spl.c /php-src/ext/spl/tests bug40091.phpt Log: MFH: Fix #44144 (object methods as spl autoload functions returned correctly) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.17.2.13r2=1.52.2.28.2.17.2.14diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.13 php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.14 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.13 Mon Feb 25 23:39:08 2008 +++ php-src/ext/spl/php_spl.c Fri Feb 29 13:55:23 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.17.2.13 2008/02/25 23:39:08 colder Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.17.2.14 2008/02/29 13:55:23 colder Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -587,8 +587,9 @@ Return all registered __autoload() functionns */ PHP_FUNCTION(spl_autoload_functions) { - zend_function *fptr, **func_ptr_ptr; + zend_function *fptr; HashPosition function_pos; + autoload_func_info *alfi; if (!EG(autoload_func)) { if (zend_hash_find(EG(function_table), ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME), (void **) fptr) == SUCCESS) { @@ -605,17 +606,22 @@ array_init(return_value); zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), function_pos) == SUCCESS) { - zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) func_ptr_ptr, function_pos); - if ((*func_ptr_ptr)-common.scope) { + zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) alfi, function_pos); + if (alfi-func_ptr-common.scope) { zval *tmp; MAKE_STD_ZVAL(tmp); array_init(tmp); - add_next_index_string(tmp, (*func_ptr_ptr)-common.scope-name, 1); - add_next_index_string(tmp, (*func_ptr_ptr)-common.function_name, 1); + if (alfi-obj) { + Z_ADDREF_P(alfi-obj); + add_next_index_zval(tmp, alfi-obj); + } else { + add_next_index_string(tmp, alfi-ce-name, 1); + } + add_next_index_string(tmp, alfi-func_ptr-common.function_name, 1); add_next_index_zval(return_value, tmp); } else - add_next_index_string(return_value, (*func_ptr_ptr)-common.function_name, 1); + add_next_index_string(return_value, alfi-func_ptr-common.function_name, 1); zend_hash_move_forward_ex(SPL_G(autoload_functions), function_pos); } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug40091.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/spl/tests/bug40091.phpt diff -u php-src/ext/spl/tests/bug40091.phpt:1.1.2.1 php-src/ext/spl/tests/bug40091.phpt:1.1.2.1.2.1 --- php-src/ext/spl/tests/bug40091.phpt:1.1.2.1 Wed Jan 10 18:14:37 2007 +++ php-src/ext/spl/tests/bug40091.phpt Fri Feb 29 13:55:23 2008 @@ -25,13 +25,19 @@ ( [0] = Array ( -[0] = MyAutoloader +[0] = MyAutoloader Object +( +) + [1] = autoload ) [1] = Array ( -[0] = MyAutoloader +[0] = MyAutoloader Object +( +) + [1] = autoload ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php