diff options
author | Andi Gutmans <andi@php.net> | 2001-12-26 20:06:06 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-12-26 20:06:06 +0000 |
commit | b04acdadf4064f5a788be0a33c124b87afa497b5 (patch) | |
tree | 4d35f2d9bc5370f97f4c0cbae5352a4041fd0ce0 /Zend/zend.c | |
parent | 29ea3da2f846ff56669a3ec525bfaad2b295bf42 (diff) | |
download | php-git-b04acdadf4064f5a788be0a33c124b87afa497b5.tar.gz |
- Print out object id for easier debugging
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 8ab5351967..ae58ac5f4b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -147,8 +147,13 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len); break; case IS_OBJECT: + expr_copy->value.str.val = (char *) emalloc(sizeof("Object id #")-1 + MAX_LENGTH_OF_LONG); + expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Object id #%ld", expr->value.obj.handle); +#if 0 + /* FIXME: This might break BC for some people */ expr_copy->value.str.len = sizeof("Object")-1; expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len); +#endif break; default: *expr_copy = *expr; |