From: Fred Drake Date: Thu, 3 May 2001 20:04:49 +0000 (+0000) Subject: The weakref support in PyObject_InitVar() as well; this should have come out X-Git-Tag: v2.1.1c1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41a39669d296bb5b3b8fc7a8c4281b82d0ea5ecf;p=thirdparty%2FPython%2Fcpython.git The weakref support in PyObject_InitVar() as well; this should have come out at the same time as it did from PyObject_Init() . --- diff --git a/Objects/object.c b/Objects/object.c index 81b140413679..ba6c88b2bcf0 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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; }