cvs: Zend / zend_variables.c
| From: | Zeev Suraski | Date: | Sat, 17 Aug 2002 21:47:27 +0000 |
| Subject: | cvs: Zend / zend_variables.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-331@lists.php.net to get a copy of this message | ||
zeev Sat Aug 17 17:47:27 2002 EDT
Modified files:
/Zend zend_variables.c
Log:
MFB
Index: Zend/zend_variables.c
diff -u Zend/zend_variables.c:1.42 Zend/zend_variables.c:1.43
--- Zend/zend_variables.c:1.42 Sat Jun 22 10:11:43 2002
+++ Zend/zend_variables.c Sat Aug 17 17:47:27 2002
@@ -53,9 +53,14 @@
}
}
break;
- case IS_OBJECT:
- zend_hash_destroy(zvalue->value.obj.properties);
- FREE_HASHTABLE(zvalue->value.obj.properties);
+ case IS_OBJECT: {
+ TSRMLS_FETCH();
+
+ if (zvalue->value.obj.properties != &EG(symbol_table)) {
+ zend_hash_destroy(zvalue->value.obj.properties);
+ FREE_HASHTABLE(zvalue->value.obj.properties);
+ }
+ }
break;
case IS_RESOURCE: {
TSRMLS_FETCH();
@@ -122,7 +127,11 @@
case IS_OBJECT: {
zval *tmp;
HashTable *original_ht = zvalue->value.obj.properties;
+ TSRMLS_FETCH();
+ if (zvalue->value.obj.properties == &EG(symbol_table)) {
+ return SUCCESS; /* do nothing */
+ }
ALLOC_HASHTABLE_REL(zvalue->value.obj.properties);
zend_hash_init(zvalue->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.obj.properties, original_ht, (copy_ctor_func_t) zval_add_ref,
(void *) &tmp, sizeof(zval *));