bjori Sun Jun 11 23:46:53 2006 UTC Modified files: /php-src/ext/reflection php_reflection.c Log: Only display visibility for methods http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.235&r2=1.236&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.235 php-src/ext/reflection/php_reflection.c:1.236 --- php-src/ext/reflection/php_reflection.c:1.235 Sat Jun 10 00:28:28 2006 +++ php-src/ext/reflection/php_reflection.c Sun Jun 11 23:46:53 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.235 2006/06/10 00:28:28 bjori Exp $ */ +/* $Id: php_reflection.c,v 1.236 2006/06/11 23:46:53 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -717,23 +717,27 @@ string_printf(str, "static "); } - /* These are mutually exclusive */ - switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { - case ZEND_ACC_PUBLIC: - string_printf(str, "public "); - break; - case ZEND_ACC_PRIVATE: - string_printf(str, "private "); - break; - case ZEND_ACC_PROTECTED: - string_printf(str, "protected "); - break; - default: - string_printf(str, "<visibility error> "); - break; + if (fptr->common.scope) { + /* These are mutually exclusive */ + switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { + case ZEND_ACC_PUBLIC: + string_printf(str, "public "); + break; + case ZEND_ACC_PRIVATE: + string_printf(str, "private "); + break; + case ZEND_ACC_PROTECTED: + string_printf(str, "protected "); + break; + default: + string_printf(str, "<visibility error> "); + break; + } + string_printf(str, "method "); + } else { + string_printf(str, "function "); } - string_printf(str, fptr->common.scope ? "method " : "function "); if (fptr->op_array.return_reference) { string_printf(str, "&"); } @@ -4771,7 +4775,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.235 2006/06/10 00:28:28 bjori Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.236 2006/06/11 23:46:53 bjori Exp $"); php_info_print_table_end(); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php