[Python-checkins] CVS: python/dist/src/Doc/lib libweakref.tex,1.8,1.9

Fred L. Drake fdrake@users.sourceforge.net
Fri, 22 Jun 2001 10:20:31 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv26469/lib

Modified Files:
	libweakref.tex 
Log Message:

Corrected an error in the information on supporting weak references in
extension types (the docs reflected a development version of the API).

This closes SF bug #435066.


Index: libweakref.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** libweakref.tex	2001/05/10 17:22:17	1.8
--- libweakref.tex	2001/06/22 17:20:29	1.9
***************
*** 227,231 ****
      "instance",
  
!     /* lots of stuff omitted for brevity */
  
      offsetof(PyInstanceObject, in_weakreflist) /* tp_weaklistoffset */
--- 227,231 ----
      "instance",
  
!     /* Lots of stuff omitted for brevity... */
  
      offsetof(PyInstanceObject, in_weakreflist) /* tp_weaklistoffset */
***************
*** 234,240 ****
  
  The only further addition is that the destructor needs to call the
! weak reference manager to clear any weak references and return if the
! object has been resurrected.  This needs to occur before any other
! parts of the destruction have occurred:
  
  \begin{verbatim}
--- 234,239 ----
  
  The only further addition is that the destructor needs to call the
! weak reference manager to clear any weak references.  This should be
! done before any other parts of the destruction have occurred:
  
  \begin{verbatim}
***************
*** 242,253 ****
  instance_dealloc(PyInstanceObject *inst)
  {
!     /* allocate tempories if needed, but do not begin
!        destruction here
       */
  
!     if (!PyObject_ClearWeakRefs((PyObject *) inst))
!         return;
  
!     /* proceed with object destuction normally */
  }
  \end{verbatim}
--- 241,251 ----
  instance_dealloc(PyInstanceObject *inst)
  {
!     /* Allocate tempories if needed, but do not begin
!        destruction just yet.
       */
  
!     PyObject_ClearWeakRefs((PyObject *) inst);
  
!     /* Proceed with object destuction normally. */
  }
  \end{verbatim}