Drop the custom I length modifier from snprintf custom implementation.

Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and
ZEND_XLONG_FMT macros defined in php-src/Zend/zend_long.h

Closes GH-5089
This commit is contained in:
George Peter Banyard 2020-01-15 17:06:02 +01:00
parent 691880b22c
commit aaa1f90e3f
2 changed files with 5 additions and 19 deletions

View file

@ -80,6 +80,11 @@ PHP 8.0 INTERNALS UPGRADE NOTES
j. compare_objects() handler was removed. Extensions should use compare() object
handler instead and check if both arguments are objects and have the same
compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro.
k. The 'I' length modifier, used to denote 32 and 64bit integer from the custom
snprintf implementation has been removed.
Use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in
php-src/Zend/zend_long.h
========================
2. Build system changes

View file

@ -712,25 +712,6 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
fmt++;
modifier = LM_LONG_DOUBLE;
break;
case 'I':
fmt++;
#if SIZEOF_LONG_LONG
if (*fmt == '6' && *(fmt+1) == '4') {
fmt += 2;
modifier = LM_LONG_LONG;
} else
#endif
if (*fmt == '3' && *(fmt+1) == '2') {
fmt += 2;
modifier = LM_LONG;
} else {
#ifdef _WIN64
modifier = LM_LONG_LONG;
#else
modifier = LM_LONG;
#endif
}
break;
case 'l':
fmt++;
#if SIZEOF_LONG_LONG