]> granicus.if.org Git - php/commitdiff
Use the fast cache here too
authorZeev Suraski <zeev@php.net>
Fri, 25 Feb 2000 17:55:33 +0000 (17:55 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 25 Feb 2000 17:55:33 +0000 (17:55 +0000)
Zend/zend_fast_cache.h
Zend/zend_variables.c

index 3da1abdbaac4c3a37873549bd19e70f1338d0cf3..cd56506f7e5f6734ff33606d18fe1a94402bcd09 100644 (file)
@@ -117,7 +117,7 @@ typedef struct _zend_fast_cache_list_entry {
 #define FREE_ZVAL_REL(z)       \
        ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
 
-/* fast cache for HashTable's */
+/* fast cache for HashTables */
 #define ALLOC_HASHTABLE(ht)    \
        ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
 
index f32da2e6538da78781b4783bdc24630395e33b69..4ca0dc6dcbe2451b1942fc02dbeabed0a7b5caf8 100644 (file)
@@ -136,7 +136,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
                                } else if (zvalue->value.ht==&EG(symbol_table)) {
                                        return SUCCESS; /* do nothing */
                                }
-                               zvalue->value.ht = (HashTable *) emalloc_rel(sizeof(HashTable));
+                               ALLOC_HASHTABLE_REL(zvalue->value.ht);
                                zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
                                zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
                        }
@@ -145,7 +145,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
                                zval *tmp;
                                HashTable *original_ht = zvalue->value.obj.properties;
 
-                               zvalue->value.obj.properties = (HashTable *) emalloc_rel(sizeof(HashTable));
+                               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 *));
                        }