mirror of
https://github.com/python/cpython.git
synced 2025-12-31 12:33:28 +00:00
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
1 changed files with 0 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue