mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944)
It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags. This will reduce the risk of running out of bits in the 32-bit tp_flags value.
This commit is contained in:
parent
43fdbd2729
commit
ada319bb6d
18 changed files with 52 additions and 51 deletions
|
|
@ -183,8 +183,7 @@ PyTypeObject PyTextIOBase_Type = {
|
|||
0, /*tp_getattro*/
|
||||
0, /*tp_setattro*/
|
||||
0, /*tp_as_buffer*/
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
||||
| Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
|
||||
textiobase_doc, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
|
|
@ -3258,7 +3257,7 @@ PyTypeObject PyTextIOWrapper_Type = {
|
|||
0, /*tp_setattro*/
|
||||
0, /*tp_as_buffer*/
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
||||
| Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
|
||||
| Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||
_io_TextIOWrapper___init____doc__, /* tp_doc */
|
||||
(traverseproc)textiowrapper_traverse, /* tp_traverse */
|
||||
(inquiry)textiowrapper_clear, /* tp_clear */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue