cvs: /php4/ext/standard var.c
| From: | Thies C. Arntzen | Date: | Wed, 02 Feb 2000 11:32:07 +0000 |
| Subject: | cvs: /php4/ext/standard var.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9661@lists.php.net to get a copy of this message | ||
thies Wed Feb 2 12:32:07 2000 EDT
Modified files:
/php4/ext/standard var.c
Log:
use FREE_ZVAL where appropiate
Index: php4/ext/standard/var.c
diff -u php4/ext/standard/var.c:1.45 php4/ext/standard/var.c:1.46
--- php4/ext/standard/var.c:1.45 Tue Jan 4 14:22:58 2000
+++ php4/ext/standard/var.c Wed Feb 2 12:31:37 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.45 2000/01/04 13:22:58 andi Exp $ */
+/* $Id: var.c,v 1.46 2000/02/02 11:31:37 thies Exp $ */
/* {{{ includes
@@ -107,7 +107,7 @@
d->type = IS_LONG;
d->value.lval = index;
php_var_dump(&d, level + 2);
- efree(d);
+ FREE_ZVAL(d);
}
break;
@@ -120,7 +120,7 @@
d->value.str.len = strlen(key);
php_var_dump(&d, level + 2);
efree(key);
- efree(d);
+ FREE_ZVAL(d);
}
break;
}
@@ -268,7 +268,7 @@
d->type = IS_LONG;
d->value.lval = index;
php_var_serialize(buf, &d);
- efree(d);
+ FREE_ZVAL(d);
break;
case HASH_KEY_IS_STRING:
ALLOC_ZVAL(d);
@@ -277,7 +277,7 @@
d->value.str.len = strlen(key);
php_var_serialize(buf, &d);
efree(key);
- efree(d);
+ FREE_ZVAL(d);
break;
}
php_var_serialize(buf, data);
@@ -392,7 +392,7 @@
if (cur == 'a') {
(*rval)->type = IS_ARRAY;
- (*rval)->value.ht = (HashTable *) emalloc(sizeof(HashTable));
+ ALLOC_HASHTABLE((*rval)->value.ht);
myht = (*rval)->value.ht;
} else {
zend_class_entry *ce;
@@ -459,15 +459,15 @@
ALLOC_ZVAL(data);
if (!php_var_unserialize(&key, p, max)) {
zval_dtor(key);
- efree(key);
- efree(data);
+ FREE_ZVAL(key);
+ FREE_ZVAL(data);
return 0;
}
if (!php_var_unserialize(&data, p, max)) {
zval_dtor(key);
- efree(key);
+ FREE_ZVAL(key);
zval_dtor(data);
- efree(data);
+ FREE_ZVAL(data);
return 0;
}
switch (key->type) {
@@ -478,8 +478,8 @@
zend_hash_update(myht, key->value.str.val, key->value.str.len + 1, &data,
sizeof(data), NULL);
break;
}
- pval_destructor(key);
- efree(key);
+ zval_dtor(key);
+ FREE_ZVAL(key);
}
return *((*p)++) == '}';