cvs: /php4/ext/standard var.c

From: Date: Tue, 04 Apr 2000 15:14:53 +0000
Subject: cvs: /php4/ext/standard var.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-13091@lists.php.net to get a copy of this message
thies Tue Apr 4 08:14:53 2000 EDT Modified files: /php4/ext/standard var.c Log: (var_dump) cleaned up some weird & buggy stuff Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.53 php4/ext/standard/var.c:1.54 --- php4/ext/standard/var.c:1.53 Sun Mar 19 03:08:07 2000 +++ php4/ext/standard/var.c Tue Apr 4 08:14:23 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.53 2000/03/19 11:08:07 thies Exp $ */ +/* $Id: var.c,v 1.54 2000/04/04 15:14:23 thies Exp $ */ /* {{{ includes @@ -39,7 +39,7 @@ { ulong index; char *key; - int i, c = 0; + int i; pval **data; char buf[512]; HashTable *myht; @@ -91,11 +91,7 @@ for (;; zend_hash_move_forward(myht)) { if ((i = zend_hash_get_current_key(myht, &key, &index)) == HASH_KEY_NON_EXISTANT) break; - if (c > 0) { - strcpy(buf, "\n"); - PHPWRITE(buf, strlen(buf)); - } - c++; + if (zend_hash_get_current_data(myht, (void **) (&data)) != SUCCESS || !data || (data == struc)) { if (i == HASH_KEY_IS_STRING) efree(key); @@ -110,6 +106,7 @@ case HASH_KEY_IS_STRING: sprintf(buf, "%*c[\"%s\"]=>\n", level + 1, ' ', key); PHPWRITE(buf, strlen(buf)); + efree(key); break; } php_var_dump(data, level + 2);

« previous php.version4 (#13091) next »