diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2019-12-04 19:57:14 -0500 |
---|---|---|
committer | Tyson Andre <tysonandre775@hotmail.com> | 2019-12-11 18:17:04 -0500 |
commit | 1695d3ed07018cd711a70582165dd8c1b765a66b (patch) | |
tree | 113b0ee106fe732dd00a3f6ac2704865a85cccbc /ext/spl/php_spl.c | |
parent | 4782e8e28a0fa21a93a65cbf32a4021cc59bddf3 (diff) | |
download | php-git-1695d3ed07018cd711a70582165dd8c1b765a66b.tar.gz |
Add funcinfo for spl global functions
This assumes that `iterator_*` will now always throw or abort on failure.
Also, move #include _arginfo.h directive to the top of the file - virtually all
other files put it there, and developers may base code on basic_functions.c.
Closes GH-4968
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r-- | ext/spl/php_spl.c | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 9534fbcf6a..39c6d34b5a 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -23,6 +23,7 @@ #include "php_main.h" #include "ext/standard/info.h" #include "php_spl.h" +#include "php_spl_arginfo.h" #include "spl_functions.h" #include "spl_engine.h" #include "spl_array.h" @@ -892,76 +893,6 @@ PHP_MINFO_FUNCTION(spl) } /* }}} */ -/* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_iterator_to_array, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_INFO(0, use_keys) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO(arginfo_iterator, 0) - ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_iterator_apply, 0, 0, 2) - ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_INFO(0, function) - ZEND_ARG_ARRAY_INFO(0, args, 1) -ZEND_END_ARG_INFO(); - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_parents, 0, 0, 1) - ZEND_ARG_INFO(0, instance) - ZEND_ARG_INFO(0, autoload) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_implements, 0, 0, 1) - ZEND_ARG_INFO(0, what) - ZEND_ARG_INFO(0, autoload) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_uses, 0, 0, 1) - ZEND_ARG_INFO(0, what) - ZEND_ARG_INFO(0, autoload) -ZEND_END_ARG_INFO() - - -ZEND_BEGIN_ARG_INFO(arginfo_spl_classes, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_spl_autoload_functions, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_autoload, 0, 0, 1) - ZEND_ARG_INFO(0, class_name) - ZEND_ARG_INFO(0, file_extensions) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_autoload_extensions, 0, 0, 0) - ZEND_ARG_INFO(0, file_extensions) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_autoload_call, 0, 0, 1) - ZEND_ARG_INFO(0, class_name) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_autoload_register, 0, 0, 0) - ZEND_ARG_INFO(0, autoload_function) - ZEND_ARG_INFO(0, throw) - ZEND_ARG_INFO(0, prepend) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_autoload_unregister, 0, 0, 1) - ZEND_ARG_INFO(0, autoload_function) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_object_hash, 0, 0, 1) - ZEND_ARG_INFO(0, obj) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_spl_object_id, 0, 0, 1) - ZEND_ARG_INFO(0, obj) -ZEND_END_ARG_INFO() -/* }}} */ - /* {{{ spl_functions */ static const zend_function_entry spl_functions[] = { @@ -978,7 +909,7 @@ static const zend_function_entry spl_functions[] = { PHP_FE(spl_object_hash, arginfo_spl_object_hash) PHP_FE(spl_object_id, arginfo_spl_object_id) PHP_FE(iterator_to_array, arginfo_iterator_to_array) - PHP_FE(iterator_count, arginfo_iterator) + PHP_FE(iterator_count, arginfo_iterator_count) PHP_FE(iterator_apply, arginfo_iterator_apply) PHP_FE_END }; |