Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6aebded

Browse files
committed
The weakref support in PyObject_InitVar() as well; this should have come out
at the same time as it did from PyObject_Init() .
1 parent ba40ec4 commit 6aebded

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

Objects/object.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, int size)
119119
op->ob_size = size;
120120
op->ob_type = tp;
121121
_Py_NewReference((PyObject *)op);
122-
if (PyType_SUPPORTS_WEAKREFS(tp)) {
123-
PyObject **weaklist = PyObject_GET_WEAKREFS_LISTPTR(op);
124-
*weaklist = NULL;
125-
}
126122
return op;
127123
}
128124

0 commit comments

Comments
 (0)