summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-03 19:44:50 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-03 19:44:50 (GMT)
commitba40ec42c80645ab18ba5603975cfe5146cf025d (patch)
tree042a9a916689fba81bd8780a5862497c7baa7fff /Objects/object.c
parent9b03e59deb49750c7b095fdc6c4e62391e42b50d (diff)
downloadcpython-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/object.c')
-rw-r--r--Objects/object.c4
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;
}