mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38: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
|
@ -323,9 +323,7 @@ PyAPI_FUNC(void) PyObject_GC_Del(void *);
|
|||
|
||||
|
||||
/* Test if a type supports weak references */
|
||||
#define PyType_SUPPORTS_WEAKREFS(t) \
|
||||
(PyType_HasFeature((t), Py_TPFLAGS_HAVE_WEAKREFS) \
|
||||
&& ((t)->tp_weaklistoffset > 0))
|
||||
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
|
||||
|
||||
#define PyObject_GET_WEAKREFS_LISTPTR(o) \
|
||||
((PyObject **) (((char *) (o)) + (o)->ob_type->tp_weaklistoffset))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue