mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove wrappers for *printf functions (#7313)
This commit is contained in:
parent
9d0db2e98a
commit
d2ccea1381
2 changed files with 7 additions and 49 deletions
|
@ -360,40 +360,7 @@ static char * _mysqlnd_pestrdup(const char * const ptr, bool persistent MYSQLND_
|
|||
/* }}} */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* MYSQLND_DEBUG_MEMORY */
|
||||
|
||||
/* {{{ _mysqlnd_sprintf_free */
|
||||
static void _mysqlnd_sprintf_free(char * p)
|
||||
{
|
||||
efree(p);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ _mysqlnd_sprintf */
|
||||
static int _mysqlnd_sprintf(char ** pbuf, size_t max_len, const char *format, ...)
|
||||
{
|
||||
int len;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
len = vspprintf(pbuf, max_len, format, ap);
|
||||
va_end(ap);
|
||||
return len;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _mysqlnd_vsprintf */
|
||||
static int _mysqlnd_vsprintf(char ** pbuf, size_t max_len, const char * format, va_list ap)
|
||||
{
|
||||
return vspprintf(pbuf, max_len, format, ap);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
#if MYSQLND_DEBUG_MEMORY == 0
|
||||
#else
|
||||
|
||||
/* {{{ mysqlnd_zend_mm_emalloc */
|
||||
static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D)
|
||||
|
@ -486,7 +453,7 @@ static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, bool persistent M
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
#endif /* MYSQLND_DEBUG_MEMORY */
|
||||
|
||||
|
||||
PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
|
||||
|
@ -502,10 +469,7 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
|
|||
_mysqlnd_pefree,
|
||||
_mysqlnd_pememdup,
|
||||
_mysqlnd_pestrndup,
|
||||
_mysqlnd_pestrdup,
|
||||
_mysqlnd_sprintf,
|
||||
_mysqlnd_vsprintf,
|
||||
_mysqlnd_sprintf_free
|
||||
_mysqlnd_pestrdup
|
||||
#else
|
||||
mysqlnd_zend_mm_emalloc,
|
||||
mysqlnd_zend_mm_pemalloc,
|
||||
|
@ -517,9 +481,6 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
|
|||
mysqlnd_zend_mm_pefree,
|
||||
mysqlnd_zend_mm_pememdup,
|
||||
mysqlnd_zend_mm_pestrndup,
|
||||
mysqlnd_zend_mm_pestrdup,
|
||||
_mysqlnd_sprintf,
|
||||
_mysqlnd_vsprintf,
|
||||
_mysqlnd_sprintf_free,
|
||||
mysqlnd_zend_mm_pestrdup
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue