From 5e77dc44dc72df6994c20e034b2f48f93bfca6ae Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 23 Aug 2003 15:47:23 +0000 Subject: [PATCH] Show ctor/dtor information and those don't return anything --- Zend/zend_reflection_api.c | 8 +++++++- ext/reflection/php_reflection.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c index 6664e347ba..2710e83518 100644 --- a/Zend/zend_reflection_api.c +++ b/Zend/zend_reflection_api.c @@ -356,6 +356,12 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM string_printf(str, fptr->common.scope ? "%sMethod [ " : "%sFunction [ ", indent); string_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? " " : " "); + if (fptr->common.fn_flags & ZEND_ACC_CTOR) { + string_printf(str, " "); + } + if (fptr->common.fn_flags & ZEND_ACC_DTOR) { + string_printf(str, " "); + } if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { string_printf(str, "abstract "); } @@ -380,7 +386,7 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM } string_printf(str, fptr->common.scope ? "method " : "function "); - if(fptr->op_array.return_reference) { + if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) { string_printf(str, "&"); } string_printf(str, "%s ] {\n", fptr->common.function_name); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 6664e347ba..2710e83518 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -356,6 +356,12 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM string_printf(str, fptr->common.scope ? "%sMethod [ " : "%sFunction [ ", indent); string_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? " " : " "); + if (fptr->common.fn_flags & ZEND_ACC_CTOR) { + string_printf(str, " "); + } + if (fptr->common.fn_flags & ZEND_ACC_DTOR) { + string_printf(str, " "); + } if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { string_printf(str, "abstract "); } @@ -380,7 +386,7 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM } string_printf(str, fptr->common.scope ? "method " : "function "); - if(fptr->op_array.return_reference) { + if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) { string_printf(str, "&"); } string_printf(str, "%s ] {\n", fptr->common.function_name); -- 2.50.1