colder          Fri Feb 29 09:26:01 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/spl    spl_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.3&r2=1.1.2.4&diff_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

Reply via email to