]> granicus.if.org Git - php/commitdiff
- Little code reordering
authorMarcus Boerger <helly@php.net>
Sun, 13 Feb 2005 18:30:26 +0000 (18:30 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 13 Feb 2005 18:30:26 +0000 (18:30 +0000)
ext/spl/php_spl.c

index 5cb7d99f7b850c6b07aa4abb24ecbe4d64a890a6..6107d376f19759d0d037e0c5411af00c13b60c1d 100755 (executable)
@@ -41,36 +41,6 @@ ZEND_GET_MODULE(spl)
 
 ZEND_DECLARE_MODULE_GLOBALS(spl)
 
-/* {{{ spl_functions
- */
-function_entry spl_functions[] = {
-       PHP_FE(spl_classes,             NULL)
-       PHP_FE(class_parents,           NULL)
-       PHP_FE(class_implements,        NULL)
-#ifdef SPL_ITERATORS_H
-       PHP_FE(iterator_to_array,       NULL)
-       PHP_FE(iterator_count,          NULL)
-#endif /* SPL_ITERATORS_H */
-       {NULL, NULL, NULL}
-};
-/* }}} */
-
-/* {{{ spl_module_entry
- */
-zend_module_entry spl_module_entry = {
-       STANDARD_MODULE_HEADER,
-       "SPL",
-       spl_functions,
-       PHP_MINIT(spl),
-       NULL,
-       NULL,
-       NULL,
-       PHP_MINFO(spl),
-       "0.2",
-       STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
 /* {{{ spl_functions_none
  */
 function_entry spl_functions_none[] = {
@@ -85,23 +55,6 @@ static void spl_init_globals(zend_spl_globals *spl_globals)
 }
 /* }}} */
 
-/* {{{ PHP_MINIT_FUNCTION(spl)
- */
-PHP_MINIT_FUNCTION(spl)
-{
-       ZEND_INIT_MODULE_GLOBALS(spl, spl_init_globals, NULL);
-
-       PHP_MINIT(spl_iterators)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(spl_array)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(spl_directory)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(spl_exceptions)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(spl_observer)(INIT_FUNC_ARGS_PASSTHRU);
-
-       return SUCCESS;
-}
-/* }}} */
-
 /* {{{ array class_parents(object instance)
  Return an array containing the names of all parent classes */
 PHP_FUNCTION(class_parents)
@@ -183,7 +136,7 @@ PHP_FUNCTION(spl_classes)
 }
 /* }}} */
 
-int spl_build_class_list_string(zval **entry, char **list TSRMLS_DC)
+int spl_build_class_list_string(zval **entry, char **list TSRMLS_DC) /* {{{ */
 {
        char *res;
        
@@ -191,7 +144,7 @@ int spl_build_class_list_string(zval **entry, char **list TSRMLS_DC)
        efree(*list);
        *list = res;
        return ZEND_HASH_APPLY_KEEP;
-}
+} /* }}} */
 
 /* {{{ PHP_MINFO(spl)
  */
@@ -225,6 +178,53 @@ PHP_MINFO_FUNCTION(spl)
 }
 /* }}} */
 
+/* {{{ spl_functions
+ */
+function_entry spl_functions[] = {
+       PHP_FE(spl_classes,             NULL)
+       PHP_FE(class_parents,           NULL)
+       PHP_FE(class_implements,        NULL)
+#ifdef SPL_ITERATORS_H
+       PHP_FE(iterator_to_array,       NULL)
+       PHP_FE(iterator_count,          NULL)
+#endif /* SPL_ITERATORS_H */
+       {NULL, NULL, NULL}
+};
+/* }}} */
+
+/* {{{ PHP_MINIT_FUNCTION(spl)
+ */
+PHP_MINIT_FUNCTION(spl)
+{
+       ZEND_INIT_MODULE_GLOBALS(spl, spl_init_globals, NULL);
+
+       PHP_MINIT(spl_iterators)(INIT_FUNC_ARGS_PASSTHRU);
+       PHP_MINIT(spl_array)(INIT_FUNC_ARGS_PASSTHRU);
+       PHP_MINIT(spl_directory)(INIT_FUNC_ARGS_PASSTHRU);
+       PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
+       PHP_MINIT(spl_exceptions)(INIT_FUNC_ARGS_PASSTHRU);
+       PHP_MINIT(spl_observer)(INIT_FUNC_ARGS_PASSTHRU);
+
+       return SUCCESS;
+}
+/* }}} */
+
+/* {{{ spl_module_entry
+ */
+zend_module_entry spl_module_entry = {
+       STANDARD_MODULE_HEADER,
+       "SPL",
+       spl_functions,
+       PHP_MINIT(spl),
+       NULL,
+       NULL,
+       NULL,
+       PHP_MINFO(spl),
+       "0.2",
+       STANDARD_MODULE_PROPERTIES
+};
+/* }}} */
+
 /*
  * Local variables:
  * tab-width: 4