cvs: /php4/ext/standard var.c

From: Date: Sun, 19 Mar 2000 11:08:37 +0000
Subject: cvs: /php4/ext/standard var.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-12396@lists.php.net to get a copy of this message
thies Sun Mar 19 03:08:37 2000 EDT Modified files: /php4/ext/standard var.c Log: (var_dump) removed "refcount-hack" - comiles without warning again (&works). Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.52 php4/ext/standard/var.c:1.53 --- php4/ext/standard/var.c:1.52 Sat Mar 18 07:04:02 2000 +++ php4/ext/standard/var.c Sun Mar 19 03:08:07 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.52 2000/03/18 15:04:02 thies Exp $ */ +/* $Id: var.c,v 1.53 2000/03/19 11:08:07 thies Exp $ */ /* {{{ includes @@ -56,11 +56,7 @@ break; case IS_LONG: - if ((*struc)->refcount == -1) { - i = sprintf(buf, "%*c[%ld]=>\n", level, ' ', (*struc)->value.lval); - } else { - i = sprintf(buf, "%*c%sint(%ld)\n", COMMON, (*struc)->value.lval); - } + i = sprintf(buf, "%*c%sint(%ld)\n", COMMON, (*struc)->value.lval); PHPWRITE(&buf[1], i - 1); break; @@ -72,18 +68,10 @@ break; case IS_STRING: - if ((*struc)->refcount == -1) { - i = sprintf(buf, "%*c[\"", level, ' '); - } else { - i = sprintf(buf, "%*c%sstring(%d) \"", COMMON, (*struc)->value.str.len); - } + i = sprintf(buf, "%*c%sstring(%d) \"", COMMON, (*struc)->value.str.len); PHPWRITE(&buf[1], i - 1); PHPWRITE((*struc)->value.str.val, (*struc)->value.str.len); - if ((*struc)->refcount == -1) { - strcpy(buf, "\"]=>\n"); - } else { - strcpy(buf, "\"\n"); - } + strcpy(buf, "\"\n"); PHPWRITE(buf, strlen(buf)); break; @@ -114,25 +102,14 @@ continue; } switch (i) { - case HASH_KEY_IS_LONG:{ - zval *d; - MAKE_STD_ZVAL(d); - ZVAL_LONG(d,index); - d->refcount = -1; - php_var_dump(&d, level + 2); - FREE_ZVAL(d); - } + case HASH_KEY_IS_LONG: + sprintf(buf, "%*c[%ld]=>\n", level + 1, ' ', index); + PHPWRITE(buf,strlen(buf)); break; - case HASH_KEY_IS_STRING:{ - zval *d; - MAKE_STD_ZVAL(d); - ZVAL_STRING(d,key,0); - d->refcount = -1; - php_var_dump(&d, level + 2); - efree(key); - FREE_ZVAL(d); - } + case HASH_KEY_IS_STRING: + sprintf(buf, "%*c[\"%s\"]=>\n", level + 1, ' ', key); + PHPWRITE(buf, strlen(buf)); break; } php_var_dump(data, level + 2);

« previous php.version4 (#12396) next »