colder          Mon Feb 11 13:59:24 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/spl    spl_dllist.c 
  Log:
  MFH: cosmetics
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_dllist.c?r1=1.1.2.8&r2=1.1.2.9&diff_format=u
Index: php-src/ext/spl/spl_dllist.c
diff -u php-src/ext/spl/spl_dllist.c:1.1.2.8 
php-src/ext/spl/spl_dllist.c:1.1.2.9
--- php-src/ext/spl/spl_dllist.c:1.1.2.8        Sun Jan 27 13:59:51 2008
+++ php-src/ext/spl/spl_dllist.c        Mon Feb 11 13:59:23 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_dllist.c,v 1.1.2.8 2008/01/27 13:59:51 colder Exp $ */
+/* $Id: spl_dllist.c,v 1.1.2.9 2008/02/11 13:59:23 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -314,25 +314,6 @@
 }
 /* }}} */
 
-static void spl_dllist_object_free_storage(void *object TSRMLS_DC) /* {{{ */
-{
-       spl_dllist_object *intern = (spl_dllist_object *)object;
-       zval              *tmp    = NULL;
-
-       zend_object_std_dtor(&intern->std TSRMLS_CC);
-
-       while(intern->llist->count > 0) {
-               tmp = (zval *)spl_ptr_llist_pop(intern->llist);
-               zval_ptr_dtor(&tmp);
-       }
-
-       spl_ptr_llist_destroy(intern->llist);
-       zval_ptr_dtor(&intern->retval);
-
-       efree(object);
-}
-/* }}} */
-
 static void spl_ptr_llist_copy(spl_ptr_llist *from, spl_ptr_llist *to) /* {{{ 
*/
 {
        spl_ptr_llist_element   *current = from->head, *next;
@@ -354,6 +335,25 @@
 
 /* }}} */
 
+static void spl_dllist_object_free_storage(void *object TSRMLS_DC) /* {{{ */
+{
+       spl_dllist_object *intern = (spl_dllist_object *)object;
+       zval              *tmp    = NULL;
+
+       zend_object_std_dtor(&intern->std TSRMLS_CC);
+
+       while(intern->llist->count > 0) {
+               tmp = (zval *)spl_ptr_llist_pop(intern->llist);
+               zval_ptr_dtor(&tmp);
+       }
+
+       spl_ptr_llist_destroy(intern->llist);
+       zval_ptr_dtor(&intern->retval);
+
+       efree(object);
+}
+/* }}} */
+
 zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval 
*object, int by_ref TSRMLS_DC);
 
 static zend_object_value spl_dllist_object_new_ex(zend_class_entry 
*class_type, spl_dllist_object **obj, zval *orig, int clone_orig TSRMLS_DC) /* 
{{{ */
@@ -1054,20 +1054,20 @@
                return NULL;
        }
 
-       iterator     = emalloc(sizeof(spl_dllist_it));
-
        Z_ADDREF_P(object);
-       iterator->intern.it.data = (void*)object;
-       iterator->intern.it.funcs = &spl_dllist_it_funcs;
-       iterator->intern.ce = ce;
-       iterator->intern.value = NULL;
+
+       iterator                     = emalloc(sizeof(spl_dllist_it));
+       iterator->intern.it.data     = (void*)object;
+       iterator->intern.it.funcs    = &spl_dllist_it_funcs;
+       iterator->intern.ce          = ce;
+       iterator->intern.value       = NULL;
        iterator->traverse_position  = dllist_object->traverse_position;
        iterator->traverse_pointer   = dllist_object->traverse_pointer;
        iterator->flags              = dllist_object->flags & 
SPL_DLLIST_IT_MASK;
+       iterator->object             = dllist_object;
 
        SPL_LLIST_CHECK_ADDREF(iterator->traverse_pointer);
 
-       iterator->object = dllist_object;
 
        return (zend_object_iterator*)iterator;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to