rrichards               Tue Jan 15 15:46:20 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/spl    spl_dllist.c 
  Log:
  MFH: fix win build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_dllist.c?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/spl/spl_dllist.c
diff -u php-src/ext/spl/spl_dllist.c:1.1.2.3 
php-src/ext/spl/spl_dllist.c:1.1.2.4
--- php-src/ext/spl/spl_dllist.c:1.1.2.3        Tue Jan 15 12:17:35 2008
+++ php-src/ext/spl/spl_dllist.c        Tue Jan 15 15:46:20 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_dllist.c,v 1.1.2.3 2008/01/15 12:17:35 colder Exp $ */
+/* $Id: spl_dllist.c,v 1.1.2.4 2008/01/15 15:46:20 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -160,6 +160,7 @@
 {
 
        spl_ptr_llist_element *current;
+       int pos = 0;
 
        if (backward) {
                current = llist->tail;
@@ -167,8 +168,6 @@
                current = llist->head;
        }
 
-       int pos = 0;
-
        while (current && pos < offset) {
                pos++;
                if (backward) {
@@ -453,12 +452,14 @@
 SPL_METHOD(SplDoublyLinkedList, push)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == 
FAILURE) {
                return;
        }
        SEPARATE_ARG_IF_REF(value);
 
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        spl_ptr_llist_push(intern->llist, value);
 
@@ -471,12 +472,14 @@
 SPL_METHOD(SplDoublyLinkedList, unshift)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == 
FAILURE) {
                return;
        }
        SEPARATE_ARG_IF_REF(value);
 
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        spl_ptr_llist_unshift(intern->llist, value);
 
@@ -489,10 +492,12 @@
 SPL_METHOD(SplDoublyLinkedList, pop)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
                return;
        }
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        value = (zval *)spl_ptr_llist_pop(intern->llist);
 
@@ -510,10 +515,12 @@
 SPL_METHOD(SplDoublyLinkedList, shift)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
                return;
        }
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        value = (zval *)spl_ptr_llist_shift(intern->llist);
 
@@ -531,10 +538,12 @@
 SPL_METHOD(SplDoublyLinkedList, top)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
                return;
        }
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
        value = (zval *)spl_ptr_llist_last(intern->llist);
 
        if (value == NULL) {
@@ -551,10 +560,12 @@
 SPL_METHOD(SplDoublyLinkedList, bottom)
 {
        zval *value;
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
                return;
        }
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
        value = (zval *)spl_ptr_llist_first(intern->llist);
 
        if (value == NULL) {
@@ -601,12 +612,13 @@
 SPL_METHOD(SplDoublyLinkedList, setIteratorMode)
 {
        long value;
+       spl_dllist_object *intern;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) == 
FAILURE) {
                return;
        }
 
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        if (intern->flags & SPL_DLLIST_IT_FIX
                && (intern->flags & SPL_DLLIST_IT_LIFO) != (value & 
SPL_DLLIST_IT_LIFO)) {
@@ -624,11 +636,13 @@
  Return the mode of iteration */
 SPL_METHOD(SplDoublyLinkedList, getIteratorMode)
 {
+       spl_dllist_object *intern;
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
                return;
        }
 
-       spl_dllist_object *intern = 
(spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+       intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
 
        RETURN_LONG(intern->flags);
 }

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

Reply via email to