helly           Thu Jul 20 22:35:44 2006 UTC

  Modified files:              
    /php-src/ext/spl    spl_iterators.c 
    /php-src/ext/spl/internal   regexiterator.inc 
    /php-src/ext/spl/tests      iterator_050.phpt iterator_051.phpt 
                                iterator_052.phpt iterator_053.phpt 
                                iterator_054.phpt iterator_055.phpt 
  Log:
  - Change order of ctor args
  # Do it before the child falls in the brunnel - aka prior to first release.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.143&r2=1.144&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.143 
php-src/ext/spl/spl_iterators.c:1.144
--- php-src/ext/spl/spl_iterators.c:1.143       Thu Jul 20 21:32:44 2006
+++ php-src/ext/spl/spl_iterators.c     Thu Jul 20 22:35:43 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_iterators.c,v 1.143 2006/07/20 21:32:44 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.144 2006/07/20 22:35:43 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1009,7 +1009,7 @@
                        intern->u.regex.use_flags = ZEND_NUM_ARGS() >= 5;
                        intern->u.regex.flags = 0;
                        intern->u.regex.preg_flags = 0;
-                       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"Os|lll", &zobject, ce_inner, &regex, &regex_len, &intern->u.regex.flags, 
&mode, &intern->u.regex.preg_flags) == FAILURE) {
+                       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"Os|lll", &zobject, ce_inner, &regex, &regex_len, &mode, 
&intern->u.regex.flags, &intern->u.regex.preg_flags) == FAILURE) {
                                php_set_error_handling(EH_NORMAL, NULL 
TSRMLS_CC);
                                return NULL;
                        }
@@ -1376,7 +1376,7 @@
 } /* }}} */
 
 #if HAVE_PCRE || HAVE_BUNDLED_PCRE
-/* {{{ proto void RegexIterator::__construct(Iterator it, string regex [, int 
flags [, int mode [, int preg_flags]]]) 
+/* {{{ proto void RegexIterator::__construct(Iterator it, string regex [, int 
mode [, int flags [, int preg_flags]]]) 
    Create an RegexIterator from another iterator and a regular expression */
 SPL_METHOD(RegexIterator, __construct)
 {
@@ -1484,7 +1484,7 @@
        }
 } /* }}} */
 
-/* {{{ proto void RecursiveRegexIterator::__construct(RecursiveIterator it, 
string regex [, int flags [, int mode [, int preg_flags]]]) 
+/* {{{ proto void RecursiveRegexIterator::__construct(RecursiveIterator it, 
string regex [, int mode [, int flags [, int preg_flags]]]) 
    Create an RecursiveRegexIterator from another recursive iterator and a 
regular expression */
 SPL_METHOD(RecursiveRegexIterator, __construct)
 {
@@ -1624,8 +1624,8 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_regex_it___construct, 0, 0, 2) 
        ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
        ZEND_ARG_INFO(0, regex)
-       ZEND_ARG_INFO(0, flags)
        ZEND_ARG_INFO(0, mode)
+       ZEND_ARG_INFO(0, flags)
        ZEND_ARG_INFO(0, preg_flags)
 ZEND_END_ARG_INFO();
 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/regexiterator.inc?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/spl/internal/regexiterator.inc
diff -u php-src/ext/spl/internal/regexiterator.inc:1.5 
php-src/ext/spl/internal/regexiterator.inc:1.6
--- php-src/ext/spl/internal/regexiterator.inc:1.5      Thu Jul 20 22:04:52 2006
+++ php-src/ext/spl/internal/regexiterator.inc  Thu Jul 20 22:35:44 2006
@@ -43,13 +43,13 @@
         *
         * @param it          inner iterator
         * @param regex       the regular expression to match
-        * @param flags       special flags (self::USE_KEY)
         * @param mode        operation mode (one of self::MATCH, 
self::GET_MATCH, 
         *                    self::ALL_MATCHES, self::SPLIT)
+        * @param flags       special flags (self::USE_KEY)
         * @param preg_flags  global PREG_* flags, see preg_match(), 
         *                    preg_match_all(), preg_split()
         */
-       function __construct(Iterator $it, $regex, $flags = 0, $mode = 0, 
$preg_flags = 0) {
+       function __construct(Iterator $it, $regex, $mode = 0, $flags = 0, 
$preg_flags = 0) {
                parent::__construct($it);
                $this->regex = $regex;
                $this->flags = $flags;
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_050.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_050.phpt
diff -u php-src/ext/spl/tests/iterator_050.phpt:1.1 
php-src/ext/spl/tests/iterator_050.phpt:1.2
--- php-src/ext/spl/tests/iterator_050.phpt:1.1 Sun Jul 16 20:52:20 2006
+++ php-src/ext/spl/tests/iterator_050.phpt     Thu Jul 20 22:35:44 2006
@@ -18,10 +18,10 @@
 }
 
 $ar = new 
ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,'));
-$it = new MyRegexIterator($ar, '/(\d),(\d)/', 0, RegexIterator::GET_MATCH);
+$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::GET_MATCH);
 $it->show();
 
-$it = new MyRegexIterator($ar, '/(\d)/', 0, RegexIterator::GET_MATCH);
+$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::GET_MATCH);
 $it->show();
 
 var_dump($ar);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_051.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_051.phpt
diff -u php-src/ext/spl/tests/iterator_051.phpt:1.1 
php-src/ext/spl/tests/iterator_051.phpt:1.2
--- php-src/ext/spl/tests/iterator_051.phpt:1.1 Sun Jul 16 20:52:20 2006
+++ php-src/ext/spl/tests/iterator_051.phpt     Thu Jul 20 22:35:44 2006
@@ -18,10 +18,10 @@
 }
 
 $ar = new 
ArrayIterator(array('1'=>0,'1,2'=>1,'1,2,3'=>2,0=>3,'FooBar'=>4,','=>5,',,'=>6));
-$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, 
RegexIterator::GET_MATCH);
+$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::GET_MATCH, 
RegexIterator::USE_KEY);
 $it->show();
 
-$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::USE_KEY, 
RegexIterator::GET_MATCH);
+$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::GET_MATCH, 
RegexIterator::USE_KEY);
 $it->show();
 
 var_dump($ar);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_052.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/spl/tests/iterator_052.phpt
diff -u php-src/ext/spl/tests/iterator_052.phpt:1.2 
php-src/ext/spl/tests/iterator_052.phpt:1.3
--- php-src/ext/spl/tests/iterator_052.phpt:1.2 Thu Jul 20 21:21:20 2006
+++ php-src/ext/spl/tests/iterator_052.phpt     Thu Jul 20 22:35:44 2006
@@ -9,11 +9,11 @@
 {
        public $uk, $re;
        
-       function __construct($it, $re, $flags, $mode)
+       function __construct($it, $re, $mode, $flags = 0)
        {
                $this->uk = $flags & self::USE_KEY;
                $this->re = $re;
-               parent::__construct($it, $re, $flags, $mode);
+               parent::__construct($it, $re, $mode, $flags);
        }
 
        function show()
@@ -35,10 +35,10 @@
 }
 
 $ar = new 
ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,'));
-$it = new MyRegexIterator($ar, '/(\d),(\d)/', 0, RegexIterator::ALL_MATCHES);
+$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::ALL_MATCHES);
 $it->show();
 
-$it = new MyRegexIterator($ar, '/(\d)/', 0, RegexIterator::ALL_MATCHES);
+$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::ALL_MATCHES);
 $it->show();
 
 var_dump($ar);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_053.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/spl/tests/iterator_053.phpt
diff -u php-src/ext/spl/tests/iterator_053.phpt:1.2 
php-src/ext/spl/tests/iterator_053.phpt:1.3
--- php-src/ext/spl/tests/iterator_053.phpt:1.2 Thu Jul 20 21:21:20 2006
+++ php-src/ext/spl/tests/iterator_053.phpt     Thu Jul 20 22:35:44 2006
@@ -9,11 +9,11 @@
 {
        public $uk, $re;
        
-       function __construct($it, $re, $flags, $mode)
+       function __construct($it, $re, $mode, $flags = 0)
        {
                $this->uk = $flags & self::USE_KEY;
                $this->re = $re;
-               parent::__construct($it, $re, $flags, $mode);
+               parent::__construct($it, $re, $mode, $flags);
        }
 
        function show()
@@ -35,10 +35,10 @@
 }
 
 $ar = new 
ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,'));
-$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, 
RegexIterator::ALL_MATCHES);
+$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::ALL_MATCHES, 
RegexIterator::USE_KEY);
 $it->show();
 
-$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::USE_KEY, 
RegexIterator::ALL_MATCHES);
+$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::ALL_MATCHES, 
RegexIterator::USE_KEY);
 $it->show();
 
 var_dump($ar);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_054.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_054.phpt
diff -u php-src/ext/spl/tests/iterator_054.phpt:1.1 
php-src/ext/spl/tests/iterator_054.phpt:1.2
--- php-src/ext/spl/tests/iterator_054.phpt:1.1 Sun Jul 16 20:52:20 2006
+++ php-src/ext/spl/tests/iterator_054.phpt     Thu Jul 20 22:35:44 2006
@@ -18,7 +18,7 @@
 }
 
 $ar = new 
ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,'));
-$it = new MyRegexIterator($ar, '/,/', 0, RegexIterator::SPLIT);
+$it = new MyRegexIterator($ar, '/,/', RegexIterator::SPLIT);
 
 $it->show();
 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_055.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_055.phpt
diff -u php-src/ext/spl/tests/iterator_055.phpt:1.1 
php-src/ext/spl/tests/iterator_055.phpt:1.2
--- php-src/ext/spl/tests/iterator_055.phpt:1.1 Sun Jul 16 20:52:20 2006
+++ php-src/ext/spl/tests/iterator_055.phpt     Thu Jul 20 22:35:44 2006
@@ -18,7 +18,7 @@
 }
 
 $ar = new 
ArrayIterator(array('1'=>0,'1,2'=>1,'1,2,3'=>2,0=>3,'FooBar'=>4,','=>5,',,'=>6));
-$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, 
RegexIterator::SPLIT);
+$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::SPLIT, 
RegexIterator::USE_KEY);
 
 $it->show();
 

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

Reply via email to