[Python-checkins] CVS: python/dist/src/Objects object.c,2.124,2.124.2.1
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 03 May 2001 12:45:36 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv12979
Modified Files:
Tag: release21-maint
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.124
retrieving revision 2.124.2.1
diff -C2 -r2.124 -r2.124.2.1
*** object.c 2001/03/25 19:16:13 2.124
--- object.c 2001/05/03 19:45:34 2.124.2.1
***************
*** 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 ----