]> granicus.if.org Git - php/commitdiff
Show ctor/dtor information and those don't return anything
authorMarcus Boerger <helly@php.net>
Sat, 23 Aug 2003 15:47:23 +0000 (15:47 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 23 Aug 2003 15:47:23 +0000 (15:47 +0000)
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 6664e347ba1716d1788514ab4b46183f3905c9ff..2710e835184ee97c42bd7d755e263c768e6a636b 100644 (file)
@@ -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) ? "<user> " : "<internal> ");
+       if (fptr->common.fn_flags & ZEND_ACC_CTOR) {
+               string_printf(str, "<ctor> ");
+       }
+       if (fptr->common.fn_flags & ZEND_ACC_DTOR) {
+               string_printf(str, "<dtor> ");
+       }
        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);
index 6664e347ba1716d1788514ab4b46183f3905c9ff..2710e835184ee97c42bd7d755e263c768e6a636b 100644 (file)
@@ -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) ? "<user> " : "<internal> ");
+       if (fptr->common.fn_flags & ZEND_ACC_CTOR) {
+               string_printf(str, "<ctor> ");
+       }
+       if (fptr->common.fn_flags & ZEND_ACC_DTOR) {
+               string_printf(str, "<dtor> ");
+       }
        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);