From ba40ec42c80645ab18ba5603975cfe5146cf025d Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 3 May 2001 19:44:50 +0000 Subject: Remove unnecessary intialization for the case of weakly-referencable objects; the code necessary to accomplish this is simpler and faster if confined to the object implementations, so we only do this there. This causes no behaviorial changes beyond a (very slight) speedup. --- Objects/object.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Objects/object.c b/Objects/object.c index 04f75e9..366d777 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -100,10 +100,6 @@ PyObject_Init(PyObject *op, PyTypeObject *tp) /* Any changes should be reflected in PyObject_INIT (objimpl.h) */ op->ob_type = tp; _Py_NewReference(op); - if (PyType_SUPPORTS_WEAKREFS(tp)) { - PyObject **weaklist = PyObject_GET_WEAKREFS_LISTPTR(op); - *weaklist = NULL; - } return op; } -- cgit v0.12