diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-03 19:44:50 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-03 19:44:50 (GMT) |
commit | ba40ec42c80645ab18ba5603975cfe5146cf025d (patch) | |
tree | 042a9a916689fba81bd8780a5862497c7baa7fff /Objects | |
parent | 9b03e59deb49750c7b095fdc6c4e62391e42b50d (diff) | |
download | cpython-ba40ec42c80645ab18ba5603975cfe5146cf025d.zip cpython-ba40ec42c80645ab18ba5603975cfe5146cf025d.tar.gz cpython-ba40ec42c80645ab18ba5603975cfe5146cf025d.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 4 |
1 files changed, 0 insertions, 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; } |