Skip to content

Commit aaa1f90

Browse files
committed
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
1 parent 691880b commit aaa1f90

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

UPGRADING.INTERNALS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ PHP 8.0 INTERNALS UPGRADE NOTES
8080
j. compare_objects() handler was removed. Extensions should use compare() object
8181
handler instead and check if both arguments are objects and have the same
8282
compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro.
83+
84+
k. The 'I' length modifier, used to denote 32 and 64bit integer from the custom
85+
snprintf implementation has been removed.
86+
Use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in
87+
php-src/Zend/zend_long.h
8388

8489
========================
8590
2. Build system changes

main/snprintf.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -712,25 +712,6 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
712712
fmt++;
713713
modifier = LM_LONG_DOUBLE;
714714
break;
715-
case 'I':
716-
fmt++;
717-
#if SIZEOF_LONG_LONG
718-
if (*fmt == '6' && *(fmt+1) == '4') {
719-
fmt += 2;
720-
modifier = LM_LONG_LONG;
721-
} else
722-
#endif
723-
if (*fmt == '3' && *(fmt+1) == '2') {
724-
fmt += 2;
725-
modifier = LM_LONG;
726-
} else {
727-
#ifdef _WIN64
728-
modifier = LM_LONG_LONG;
729-
#else
730-
modifier = LM_LONG;
731-
#endif
732-
}
733-
break;
734715
case 'l':
735716
fmt++;
736717
#if SIZEOF_LONG_LONG

0 commit comments

Comments
 (0)