mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
MFH: Add pestrndup()
This commit is contained in:
parent
622ac25e81
commit
0ff96ccc7c
@ -113,6 +113,7 @@ inline static void * __zend_realloc(void *p, size_t len)
|
||||
#define safe_perealloc(ptr, nmemb, size, offset, persistent) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset)))
|
||||
#define perealloc_recoverable(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
|
||||
#define pestrdup(s, persistent) ((persistent)?strdup(s):estrdup(s))
|
||||
#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
|
||||
|
||||
#define pemalloc_rel(size, persistent) ((persistent)?__zend_malloc(size):emalloc_rel(size))
|
||||
#define pefree_rel(ptr, persistent) ((persistent)?free(ptr):efree_rel(ptr))
|
||||
|
Loading…
Reference in New Issue
Block a user