[Python-checkins] python/dist/src/Doc/ext newtypes.tex,1.25,1.26
dcjim@users.sourceforge.net
dcjim@users.sourceforge.net
Fri, 16 May 2003 06:52:01 -0700
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory sc8-pr-cvs1:/tmp/cvs-serv32185
Modified Files:
newtypes.tex
Log Message:
Added a missing PyObject* cast to the dealloc examples.
Added a note that the mechanism for defining new tyoes documented here
only works for Python 2.2 and higher.
Index: newtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** newtypes.tex 16 May 2003 13:32:59 -0000 1.25
--- newtypes.tex 16 May 2003 13:51:58 -0000 1.26
***************
*** 13,16 ****
--- 13,24 ----
get started.
+ \begin{notice}
+ The way new types are defined changed dramatically (and for the
+ better) in Python 2.2. This document documents how to define new
+ types for Python 2.2 and later. If you need to support older
+ versions of Python, you will need to refer to older versions of this
+ documentation.
+ \end{notice}
+
\section{The Basics
\label{dnt-basics}}
***************
*** 307,311 ****
Py_XDECREF(self->first);
Py_XDECREF(self->last);
! self->ob_type->tp_free(self);
}
\end{verbatim}
--- 315,319 ----
Py_XDECREF(self->first);
Py_XDECREF(self->last);
! self->ob_type->tp_free((PyObject*)self);
}
\end{verbatim}
***************
*** 793,797 ****
Py_DECREF(self->my_callback);
}
! obj->ob_type->tp_free(self);
}
\end{verbatim}
--- 801,805 ----
Py_DECREF(self->my_callback);
}
! obj->ob_type->tp_free((PyObject*)self);
}
\end{verbatim}