svn: /php/php-src/trunk/ UPGRADING.INTERNALS Zend/zend_alloc.h
| From: | Pierre Joye | Date: | Wed, 15 Sep 2010 17:27:43 +0000 |
| Subject: | svn: /php/php-src/trunk/ UPGRADING.INTERNALS Zend/zend_alloc.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63499@lists.php.net to get a copy of this message | ||
pajoye Wed, 15 Sep 2010 17:27:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303405
Log:
- macros--; ZEND_FAST_* are now gone
Changed paths:
U php/php-src/trunk/UPGRADING.INTERNALS
U php/php-src/trunk/Zend/zend_alloc.h
Modified: php/php-src/trunk/UPGRADING.INTERNALS
===================================================================
--- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-15 17:04:22 UTC (rev 303404)
+++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-15 17:27:43 UTC (rev 303405)
@@ -57,6 +57,13 @@
e. Zend\zend_fast_cache.h
It should not have been used anymore since php5, but now this header has
-been removed.
+been removed. The following macros are not available anymore:
+ZEND_FAST_ALLOC(p, type, fc_type)
+ZEND_FAST_FREE(p, fc_type)
+ZEND_FAST_ALLOC_REL(p, type, fc_type)
+ZEND_FAST_FREE_REL(p, fc_type)
+Use emalloc, emalloc_rel, efree or efree_rel instead.
+
+
Modified: php/php-src/trunk/Zend/zend_alloc.h
===================================================================
--- php/php-src/trunk/Zend/zend_alloc.h 2010-09-15 17:04:22 UTC (rev 303404)
+++ php/php-src/trunk/Zend/zend_alloc.h 2010-09-15 17:27:43 UTC (rev 303405)
@@ -161,45 +161,31 @@
END_EXTERN_C()
-/* Macroses for zend_fast_cache.h compatibility */
-
-#define ZEND_FAST_ALLOC(p, type, fc_type) \
- (p) = (type *) emalloc(sizeof(type))
-
-#define ZEND_FAST_FREE(p, fc_type) \
- efree(p)
-
-#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
- (p) = (type *) emalloc_rel(sizeof(type))
-
-#define ZEND_FAST_FREE_REL(p, fc_type) \
- efree_rel(p)
-
/* fast cache for zval's */
#define ALLOC_ZVAL(z) \
- ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
+ (z) = (zval *) emalloc(sizeof(zval))
#define FREE_ZVAL(z) \
- ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
+ efree_rel(z)
#define ALLOC_ZVAL_REL(z) \
- ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
+ (z) = (zval *) emalloc_rel(sizeof(zval))
#define FREE_ZVAL_REL(z) \
- ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
+ efree_rel(z)
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
- ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
+ (ht) = (HashTable *) emalloc(sizeof(HashTable))
#define FREE_HASHTABLE(ht) \
- ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
+ efree(ht)
#define ALLOC_HASHTABLE_REL(ht) \
- ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
+ (ht) = (HashTable *) emalloc_rel(sizeof(HashTable))
#define FREE_HASHTABLE_REL(ht) \
- ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
+ efree_rel(ht)
/* Heap functions */
typedef struct _zend_mm_heap zend_mm_heap;