]> granicus.if.org Git - php/commitdiff
- MFH Rearrange code: mode Countable from spl_array.c to spl_iterator.c
authorMarcus Boerger <helly@php.net>
Thu, 8 Feb 2007 22:17:40 +0000 (22:17 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 8 Feb 2007 22:17:40 +0000 (22:17 +0000)
ext/spl/spl_array.c
ext/spl/spl_array.h
ext/spl/spl_iterators.c
ext/spl/spl_iterators.h

index 5ba4689490f21a62ae1fd983f1676817e6795b78..419eb52e38c42fcd4bc3a71cceb65812f01bfb06 100755 (executable)
@@ -42,8 +42,6 @@ zend_object_handlers spl_handler_ArrayIterator;
 PHPAPI zend_class_entry  *spl_ce_ArrayIterator;
 PHPAPI zend_class_entry  *spl_ce_RecursiveArrayIterator;
 
-PHPAPI zend_class_entry  *spl_ce_Countable;
-
 #define SPL_ARRAY_STD_PROP_LIST      0x00000001
 #define SPL_ARRAY_ARRAY_AS_PROPS     0x00000002
 #define SPL_ARRAY_OVERLOADED_REWIND  0x00010000
@@ -1495,11 +1493,6 @@ static zend_function_entry spl_funcs_RecursiveArrayIterator[] = {
        {NULL, NULL, NULL}
 };
 
-static zend_function_entry spl_funcs_Countable[] = {
-       SPL_ABSTRACT_ME(Countable, count,   NULL)
-       {NULL, NULL, NULL}
-};
-
 /* {{{ PHP_MINIT_FUNCTION(spl_array) */
 PHP_MINIT_FUNCTION(spl_array)
 {
@@ -1533,8 +1526,6 @@ PHP_MINIT_FUNCTION(spl_array)
        REGISTER_SPL_IMPLEMENTS(RecursiveArrayIterator, RecursiveIterator);
        spl_ce_RecursiveArrayIterator->get_iterator = spl_array_get_iterator;
 
-       REGISTER_SPL_INTERFACE(Countable);
-       
        REGISTER_SPL_IMPLEMENTS(ArrayObject, Countable);
        REGISTER_SPL_IMPLEMENTS(ArrayIterator, Countable);
 
index 0ef75f47fca10d31e7f7d11684cdd0abb66769ca..5e8f23dca4d2c9bda813455ea9aebe246cbcf77e 100755 (executable)
@@ -27,7 +27,6 @@
 extern PHPAPI zend_class_entry *spl_ce_ArrayObject;
 extern PHPAPI zend_class_entry *spl_ce_ArrayIterator;
 extern PHPAPI zend_class_entry *spl_ce_RecursiveArrayIterator;
-extern PHPAPI zend_class_entry *spl_ce_Countable;
 
 PHP_MINIT_FUNCTION(spl_array);
 
index b438c71501314f8cd0cb397c22c1030c81d96f3a..4cf4606c8e950a947e793c7805eff7069ba4f759 100755 (executable)
@@ -57,6 +57,7 @@ PHPAPI zend_class_entry *spl_ce_EmptyIterator;
 PHPAPI zend_class_entry *spl_ce_AppendIterator;
 PHPAPI zend_class_entry *spl_ce_RegexIterator;
 PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
+PHPAPI zend_class_entry *spl_ce_Countable;
 
 zend_function_entry spl_funcs_RecursiveIterator[] = {
        SPL_ABSTRACT_ME(RecursiveIterator, hasChildren,  NULL)
@@ -2844,6 +2845,11 @@ static zend_function_entry spl_funcs_OuterIterator[] = {
        {NULL, NULL, NULL}
 };
 
+static zend_function_entry spl_funcs_Countable[] = {
+       SPL_ABSTRACT_ME(Countable, count,   NULL)
+       {NULL, NULL, NULL}
+};
+
 /* {{{ PHP_MINIT_FUNCTION(spl_iterators)
  */
 PHP_MINIT_FUNCTION(spl_iterators)
@@ -2886,6 +2892,7 @@ PHP_MINIT_FUNCTION(spl_iterators)
 
        REGISTER_SPL_SUB_CLASS_EX(ParentIterator, RecursiveFilterIterator, spl_dual_it_new, spl_funcs_ParentIterator);
 
+       REGISTER_SPL_INTERFACE(Countable);
        REGISTER_SPL_INTERFACE(SeekableIterator);
        REGISTER_SPL_ITERATOR(SeekableIterator);
 
index 522a489896f111bb477c3f463e1aaab73e6aa9bf..5cd44e6a92abd56001c73203466e2435dc4a0d1e 100755 (executable)
@@ -50,6 +50,7 @@ extern PHPAPI zend_class_entry *spl_ce_EmptyIterator;
 extern PHPAPI zend_class_entry *spl_ce_AppendIterator;
 extern PHPAPI zend_class_entry *spl_ce_RegexIterator;
 extern PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
+extern PHPAPI zend_class_entry *spl_ce_Countable;
 
 PHP_MINIT_FUNCTION(spl_iterators);