[Python-checkins] CVS: python/dist/src/Misc NEWS,1.137,1.138

Fred L. Drake fdrake@users.sourceforge.net
Thu, 22 Mar 2001 10:26:49 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv30079/Misc

Modified Files:
	NEWS 
Log Message:

A small change to the C API for weakly-referencable types:  Such types
must now initialize the extra field used by the weak-ref machinery to
NULL themselves, to avoid having to require PyObject_INIT() to check
if the type supports weak references and do it there.  This causes less
work to be done for all objects (the type object does not need to be
consulted to check for the Py_TPFLAGS_HAVE_WEAKREFS bit).


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.137
retrieving revision 1.138
diff -C2 -r1.137 -r1.138
*** NEWS	2001/03/22 15:42:08	1.137
--- NEWS	2001/03/22 18:26:47	1.138
***************
*** 62,65 ****
--- 62,71 ----
    number from a Py_complex C value.
  
+ - Extensions types which support weak references must now set the
+   field allocated for the weak reference machinery to NULL themselves;
+   this is done to avoid the cost of checking each object for having a
+   weakly referencable type in PyObject_INIT(), since most types are
+   not weakly referencable.
+ 
  Distutils