mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Get rid of most of the flags (in tp_flags) that keep track of various
variations of the type struct and its attachments. In Py3k, all type structs have to have all fields -- no binary backwards compatibility. Had to change the complex object to a new-style number!
This commit is contained in:
parent
73e5a5b65d
commit
3cf5b1eef9
36 changed files with 170 additions and 357 deletions
|
|
@ -846,8 +846,8 @@ static PyTypeObject deque_type = {
|
|||
PyObject_GenericGetAttr, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
|
||||
Py_TPFLAGS_HAVE_GC, /* tp_flags */
|
||||
deque_doc, /* tp_doc */
|
||||
(traverseproc)deque_traverse, /* tp_traverse */
|
||||
(inquiry)deque_clear, /* tp_clear */
|
||||
|
|
@ -1299,8 +1299,8 @@ static PyTypeObject defdict_type = {
|
|||
PyObject_GenericGetAttr, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
|
||||
Py_TPFLAGS_HAVE_GC, /* tp_flags */
|
||||
defdict_doc, /* tp_doc */
|
||||
defdict_traverse, /* tp_traverse */
|
||||
(inquiry)defdict_tp_clear, /* tp_clear */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue