mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08: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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user