The weakref support in PyObject_InitVar() as well; this should have come out
at the same time as it did from PyObject_Init() .
This commit is contained in:
parent
ba40ec42c8
commit
6aebded915
|
@ -119,10 +119,6 @@ PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, int size)
|
|||
op->ob_size = size;
|
||||
op->ob_type = tp;
|
||||
_Py_NewReference((PyObject *)op);
|
||||
if (PyType_SUPPORTS_WEAKREFS(tp)) {
|
||||
PyObject **weaklist = PyObject_GET_WEAKREFS_LISTPTR(op);
|
||||
*weaklist = NULL;
|
||||
}
|
||||
return op;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue