com php-src: more fixes to var_dump and co.: ext/st andard/var.c
| From: | Anatol Belski | Date: | Sun, 17 Aug 2014 20:34:18 +0000 |
| Subject: | com php-src: more fixes to var_dump and co.: ext/st andard/var.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80796@lists.php.net to get a copy of this message | ||
Commit: a3b0cafc0190b2b696a5577a29b46c4d071ac302
Author: Anatol Belski <ab@php.net> Sun, 17 Aug 2014 22:34:18 +0200
Parents: 77eb6e727819214e003bb0832a52e530627d2316
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a3b0cafc0190b2b696a5577a29b46c4d071ac302
Log:
more fixes to var_dump and co.
Changed paths:
M ext/standard/var.c
Diff:
diff --git a/ext/standard/var.c b/ext/standard/var.c
index f757b26..aa555c3 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -57,7 +57,7 @@ static uint zend_obj_num_elements(HashTable *ht)
static void php_array_element_dump(zval *zv, php_uint_t index, zend_string *key, int level
TSRMLS_DC) /* {{{ */
{
if (key == NULL) { /* numeric key */
- php_printf("%*c[%ld]=>\n", level + 1, ' ', index);
+ php_printf("%*c[" ZEND_UINT_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
php_printf("%*c[\"", level + 1, ' ');
PHPWRITE(key->val, key->len);
@@ -72,7 +72,7 @@ static void php_object_property_dump(zval *zv, php_uint_t index, zend_string *ke
const char *prop_name, *class_name;
if (key == NULL) { /* numeric key */
- php_printf("%*c[%ld]=>\n", level + 1, ' ', index);
+ php_printf("%*c[" ZEND_UINT_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
int unmangle = zend_unmangle_property_name(key->val, key->len, &class_name,
&prop_name);
php_printf("%*c[", level + 1, ' ');
@@ -230,7 +230,7 @@ PHP_FUNCTION(var_dump)
static void zval_array_element_dump(zval *zv, php_uint_t index, zend_string *key, int level
TSRMLS_DC) /* {{{ */
{
if (key == NULL) { /* numeric key */
- php_printf("%*c[%ld]=>\n", level + 1, ' ', index);
+ php_printf("%*c[" ZEND_UINT_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
php_printf("%*c[\"", level + 1, ' ');
PHPWRITE(key->val, key->len);
@@ -245,7 +245,7 @@ static void zval_object_property_dump(zval *zv, php_uint_t index, zend_string *k
const char *prop_name, *class_name;
if (key == NULL) { /* numeric key */
- php_printf("%*c[%ld]=>\n", level + 1, ' ', index);
+ php_printf("%*c[" ZEND_UINT_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
zend_unmangle_property_name(key->val, key->len, &class_name, &prop_name);
php_printf("%*c[", level + 1, ' ');