mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fixed pefree_size (efree_size will be expaned to do {} while () form)
This commit is contained in:
commit
c20a97df6d
1 changed files with 8 additions and 1 deletions
|
@ -195,7 +195,14 @@ ZEND_API void * __zend_realloc(void *p, size_t len) ZEND_ATTRIBUTE_ALLOC_SIZE(2)
|
||||||
#define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size))
|
#define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size))
|
||||||
#define safe_pemalloc(nmemb, size, offset, persistent) ((persistent)?_safe_malloc(nmemb, size, offset):safe_emalloc(nmemb, size, offset))
|
#define safe_pemalloc(nmemb, size, offset, persistent) ((persistent)?_safe_malloc(nmemb, size, offset):safe_emalloc(nmemb, size, offset))
|
||||||
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
|
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
|
||||||
#define pefree_size(ptr, size, persistent) ((persistent)?free(ptr):efree_size(ptr, size))
|
#define pefree_size(ptr, size, persistent) do { \
|
||||||
|
if (persistent) { \
|
||||||
|
free(ptr); \
|
||||||
|
} else { \
|
||||||
|
efree_size(ptr, size);\
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
|
#define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
|
||||||
#define perealloc(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc((ptr), (size)))
|
#define perealloc(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc((ptr), (size)))
|
||||||
#define perealloc2(ptr, size, copy_size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc2((ptr), (size), (copy_size)))
|
#define perealloc2(ptr, size, copy_size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc2((ptr), (size), (copy_size)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue