From: Marcus Boerger Date: Sun, 13 Feb 2005 18:30:26 +0000 (+0000) Subject: - Little code reordering X-Git-Tag: RELEASE_0_2_4~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21705a45bf57def43a69ac94e847411f16babd72;p=php - Little code reordering --- diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 5cb7d99f7b..6107d376f1 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -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