[Python-checkins] CVS: python/dist/src/Objects object.c,2.126,2.127
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 03 May 2001 12:44:52 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv12831
Modified Files:
object.c
Log Message:
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.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.126
retrieving revision 2.127
diff -C2 -r2.126 -r2.127
*** object.c 2001/05/01 16:53:37 2.126
--- object.c 2001/05/03 19:44:50 2.127
***************
*** 101,108 ****
op->ob_type = tp;
_Py_NewReference(op);
- if (PyType_SUPPORTS_WEAKREFS(tp)) {
- PyObject **weaklist = PyObject_GET_WEAKREFS_LISTPTR(op);
- *weaklist = NULL;
- }
return op;
}
--- 101,104 ----