Added a note that the mechanism for defining new tyoes documented here
only works for Python 2.2 and higher.
but there are some details that you need to understand before you can
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}}
{
Py_XDECREF(self->first);
Py_XDECREF(self->last);
- self->ob_type->tp_free(self);
+ self->ob_type->tp_free((PyObject*)self);
}
\end{verbatim}
Py_DECREF(self->my_callback);
}
- obj->ob_type->tp_free(self);
+ obj->ob_type->tp_free((PyObject*)self);
}
\end{verbatim}