From f8bbafd604528c7162b7b1706a09e12545fb2dcb Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sun, 3 Aug 2003 17:40:44 +0000 Subject: ntroduce infrastructure for supplying information about arguments, including: - Whether or not to pass by ref (replaces the old arg_types, with arg_info) - Argument name (for future use, maybe introspection) - Class/Interface name (for type hints) - If a class/interface name is available, whether to allow a null instance Both user and builtin functions share the same data structures. To declare a builtin function that expects its first arg to be an instance of class 'Person', its second argument as a regular arg, and its third by reference, use: ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0) ZEND_ARG_OBJ_INFO(0, someone, Person, 1) ZEND_ARG_PASS_INFO(0) ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family of macros. The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref. The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat the arguments for which there's no explicit information as pass by reference or not. The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values. --- ext/reflection/php_reflection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index af5286c891..efbadb544f 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1621,7 +1621,7 @@ ZEND_FUNCTION(reflection_class_getinterfaces) array_init(return_value); if (ce->num_interfaces) { - int i; + zend_uint i; for (i=0; i < ce->num_interfaces; i++) { zval *interface; -- cgit v1.2.1