Commit 71d8775
authored
pythongh-93202: Always use %zd printf formatter (python#93201)
Python now always use the ``%zu`` and ``%zd`` printf formats to
format a size_t or Py_ssize_t number. Building Python 3.12 requires a
C11 compiler, so these printf formats are now always supported.
* PyObject_Print() and _PyObject_Dump() now use the printf %zd format
to display an object reference count.
* Update PY_FORMAT_SIZE_T comment.
* Remove outdated notes about the %zd format in PyBytes_FromFormat()
and PyUnicode_FromFormat() documentations.
* configure no longer checks for the %zd format and no longer defines
PY_FORMAT_SIZE_T macro in pyconfig.h.
* pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is
no longer supported. Python 3.12 now requires macOS 10.6 (Snow
Leopard) or newer.1 parent 9485a0d commit 71d8775
File tree
10 files changed
+11
-168
lines changed- Doc/c-api
- Include
- Misc/NEWS.d/next/Build
- Modules/_ctypes
- Objects
10 files changed
+11
-168
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | 400 | | |
405 | 401 | | |
406 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 191 | + | |
| 192 | + | |
215 | 193 | | |
216 | 194 | | |
217 | 195 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | 277 | | |
280 | | - | |
281 | | - | |
| 278 | + | |
282 | 279 | | |
283 | 280 | | |
284 | 281 | | |
| |||
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 371 | + | |
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6004 | 6004 | | |
6005 | 6005 | | |
6006 | 6006 | | |
6007 | | - | |
6008 | | - | |
6009 | | - | |
6010 | | - | |
6011 | | - | |
6012 | | - | |
6013 | | - | |
6014 | | - | |
6015 | | - | |
6016 | | - | |
6017 | | - | |
6018 | | - | |
6019 | | - | |
6020 | | - | |
6021 | | - | |
6022 | | - | |
6023 | | - | |
6024 | | - | |
6025 | | - | |
6026 | | - | |
6027 | | - | |
6028 | | - | |
6029 | | - | |
6030 | | - | |
6031 | | - | |
6032 | | - | |
6033 | | - | |
6034 | | - | |
6035 | | - | |
6036 | | - | |
6037 | | - | |
6038 | | - | |
6039 | | - | |
6040 | | - | |
6041 | | - | |
6042 | | - | |
6043 | | - | |
6044 | | - | |
6045 | | - | |
6046 | | - | |
6047 | | - | |
6048 | | - | |
6049 | | - | |
6050 | | - | |
6051 | | - | |
6052 | | - | |
6053 | 6007 | | |
6054 | 6008 | | |
6055 | 6009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1506 | 1506 | | |
1507 | 1507 | | |
1508 | 1508 | | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | 1509 | | |
1513 | 1510 | | |
1514 | 1511 | | |
| |||
0 commit comments