]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The weakref support in PyObject_InitVar() as well; this should have come out
authorFred Drake <fdrake@acm.org>
Thu, 3 May 2001 20:04:49 +0000 (20:04 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 3 May 2001 20:04:49 +0000 (20:04 +0000)
at the same time as it did from PyObject_Init() .

Objects/object.c

index 81b1404136793c0afdc66e6bd94592d5c09bd225..ba6c88b2bcf00dc7cf1a1efcee94f8a1718c0a03 100644 (file)
@@ -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;
 }