Skip to content

Commit 2b5fb76

Browse files
committed
Apply custom format/length modifier removal to spprintf
This mimicks the changes made to the custom snprintf implementation by removing the custom 'v' format and custom 'I' length modifier from the spprintf implementation. Closes GH-5108
1 parent 28e650a commit 2b5fb76

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ PHP 8.0 INTERNALS UPGRADE NOTES
8282
compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro.
8383

8484
k. The 'I' length modifier, used to denote 32 and 64bit integer from the custom
85-
snprintf implementation has been removed.
85+
snprintf and spprintf implementations has been removed.
8686
Use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in
8787
php-src/Zend/zend_long.h
8888

89-
The 'v' format from the custom snprintf implementation has been removed.
90-
Use the standard 's' format instead.
89+
The 'v' format from the custom snprintf and spprintf implementations has
90+
been removed. Use the standard 's' format instead.
9191

9292
========================
9393
2. Build system changes

main/spprintf.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -312,25 +312,6 @@ static void xbuf_format_converter(void *xbuf, zend_bool is_char, const char *fmt
312312
fmt++;
313313
modifier = LM_LONG_DOUBLE;
314314
break;
315-
case 'I':
316-
fmt++;
317-
#if SIZEOF_LONG_LONG
318-
if (*fmt == '6' && *(fmt+1) == '4') {
319-
fmt += 2;
320-
modifier = LM_LONG_LONG;
321-
} else
322-
#endif
323-
if (*fmt == '3' && *(fmt+1) == '2') {
324-
fmt += 2;
325-
modifier = LM_LONG;
326-
} else {
327-
#ifdef _WIN64
328-
modifier = LM_LONG_LONG;
329-
#else
330-
modifier = LM_LONG;
331-
#endif
332-
}
333-
break;
334315
case 'l':
335316
fmt++;
336317
#if SIZEOF_LONG_LONG
@@ -587,7 +568,6 @@ static void xbuf_format_converter(void *xbuf, zend_bool is_char, const char *fmt
587568

588569

589570
case 's':
590-
case 'v':
591571
s = va_arg(ap, char *);
592572
if (s != NULL) {
593573
if (!adjust_precision) {

0 commit comments

Comments
 (0)