]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-146578: _zstd: Fix printf format for pledged size errors (#146576)
authorcui <cuiweixie@gmail.com>
Tue, 21 Apr 2026 19:49:44 +0000 (03:49 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Apr 2026 19:49:44 +0000 (12:49 -0700)
Use %llu instead of %ull for unsigned long long in zstd_contentsize_converter ValueError messages.

Modules/_zstd/compressor.c

index f90bc9c5ab58b121cbd47904f157b37f7a6fe793..8a3cd182ab15160b51e4a769257d508a345c5615 100644 (file)
@@ -74,7 +74,7 @@ zstd_contentsize_converter(PyObject *size, unsigned long long *p)
             if (PyErr_ExceptionMatches(PyExc_OverflowError)) {
                 PyErr_Format(PyExc_ValueError,
                              "size argument should be a positive int less "
-                             "than %ull", ZSTD_CONTENTSIZE_ERROR);
+                             "than %llu", ZSTD_CONTENTSIZE_ERROR);
                 return 0;
             }
             return 0;
@@ -83,7 +83,7 @@ zstd_contentsize_converter(PyObject *size, unsigned long long *p)
             *p = ZSTD_CONTENTSIZE_ERROR;
             PyErr_Format(PyExc_ValueError,
                          "size argument should be a positive int less "
-                         "than %ull", ZSTD_CONTENTSIZE_ERROR);
+                         "than %llu", ZSTD_CONTENTSIZE_ERROR);
             return 0;
         }
         *p = pledged_size;