]> granicus.if.org Git - php/commitdiff
Drop the custom I length modifier from snprintf custom implementation.
authorGeorge Peter Banyard <girgias@php.net>
Wed, 15 Jan 2020 16:06:02 +0000 (17:06 +0100)
committerGeorge Peter Banyard <girgias@php.net>
Mon, 20 Jan 2020 22:03:10 +0000 (23:03 +0100)
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

UPGRADING.INTERNALS
main/snprintf.c

index 7c4ed27a627448b6fe59773e8ab8c398dc3fdf0d..62492bab39fe824f42959d2979135d5fbe57c44d 100644 (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
index 1acbf10dfb59d795e0f5ca4254fdcaff2ae9f435..2dd2aa276fa4d9871c2d8e952e52c85712377a51 100644 (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