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

Fred L. Drake fdrake@users.sourceforge.net
Thu, 22 Mar 2001 20:36:04 -0800


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

Modified Files:
	libweakref.tex 
Log Message:

Update to the most recent weakref changes.


Index: libweakref.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** libweakref.tex	2001/02/27 18:36:55	1.3
--- libweakref.tex	2001/03/23 04:36:02	1.4
***************
*** 17,32 ****
  
  Not all objects can be weakly referenced; those objects which do
! include class instances and dictionaries.  Extension types can easily
  be made to support weak references; see section \ref{weakref-extension},
  ``Weak References in Extension Types,'' for more information.
  
- \strong{Warning:}
- The desired semantics of weak-reference proxy objects are not
- completely clear; it is very difficult to create proxies which behave
- exactly like the type of the referent.  The details of these objects
- are likely to change to some degree before the final release as
- experience reports become available.
  
- 
  \begin{funcdesc}{ref}{object\optional{, callback}}
    Return a weak reference to \var{object}.  If \var{callback} is
--- 17,26 ----
  
  Not all objects can be weakly referenced; those objects which do
! include class instances, functions written in Python (but not in C),
! and methods (both bound and unbound).  Extension types can easily
  be made to support weak references; see section \ref{weakref-extension},
  ``Weak References in Extension Types,'' for more information.
  
  
  \begin{funcdesc}{ref}{object\optional{, callback}}
    Return a weak reference to \var{object}.  If \var{callback} is
***************
*** 57,61 ****
    are equal (regardless of the \var{callback}).  If the \var{object}
    has been deleted, they are equal iff they are identical.
- 
  \end{funcdesc}
  
--- 51,54 ----
***************
*** 199,204 ****
  For an object to be weakly referencable, the extension must include a
  \ctype{PyObject *} field in the instance structure for the use of the
! weak reference mechanism; it will be initialized by Python's functions
! for object creation.  It must also set the \code{tp_weaklistoffset}
  field of the corresponding type object to the offset of the field.
  For example, the instance type is defined with the following structure:
--- 192,197 ----
  For an object to be weakly referencable, the extension must include a
  \ctype{PyObject *} field in the instance structure for the use of the
! weak reference mechanism; it must be initialized to \NULL{} by the
! object's constructor.  It must also set the \member{tp_weaklistoffset}
  field of the corresponding type object to the offset of the field.
  For example, the instance type is defined with the following structure: