Move php_gcvt to zend_gcvt

Also move PHP_DOUBLE_MAX_LENGTH to ZEND_DOUBLE_MAX_LENGTH.
This commit is contained in:
Nikita Popov 2021-08-02 14:40:01 +02:00
parent 7c9ac479eb
commit d28f6e694d
11 changed files with 126 additions and 123 deletions

View file

@ -38,7 +38,7 @@ static inline double mysql_float_to_double(float fp4, int decimals) {
char num_buf[MAX_CHAR_BUF_LEN]; /* Over allocated */
if (decimals < 0) {
php_gcvt(fp4, FLT_DIG, '.', 'e', num_buf);
zend_gcvt(fp4, FLT_DIG, '.', 'e', num_buf);
} else {
snprintf(num_buf, MAX_CHAR_BUF_LEN, "%.*F", decimals, fp4);
}