johannes                Mon Sep 11 21:21:43 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/reflection     php_reflection.c 
  Log:
  - MFH: Print the type of the original value
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.23&r2=1.164.2.33.2.24&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.23 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.24
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.23     Mon Sep 11 
17:08:42 2006
+++ php-src/ext/reflection/php_reflection.c     Mon Sep 11 21:21:43 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $ 
*/
+/* $Id: php_reflection.c,v 1.164.2.33.2.24 2006/09/11 21:21:43 johannes Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -537,9 +537,12 @@
 /* {{{ _const_string */
 static void _const_string(string *str, char *name, zval *value, char *indent 
TSRMLS_DC)
 {
+       char *type;
        zval value_copy;
        int use_copy;
 
+       type = zend_zval_type_name(value);
+
        zend_make_printable_zval(value, &value_copy, &use_copy);
        if (use_copy) {
                value = &value_copy;
@@ -547,7 +550,7 @@
 
        string_printf(str, "%s    Constant [ %s %s ] { %s }\n",
                           indent,
-                          zend_zval_type_name(value),
+                          type,
                           name,
                           Z_STRVAL_P(value));
 
@@ -4812,7 +4815,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.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.24 2006/09/11 21:21:43 johannes Exp $");
 
        php_info_print_table_end();
 } /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to