#5938: use PyVarObject_HEAD_INIT instead of PyObject_HEAD_INIT in noddy examples.

This commit is contained in:
Georg Brandl 2009-05-05 07:55:26 +00:00
parent 42c66d4f47
commit 5133529614
4 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ typedef struct {
} noddy_NoddyObject;
static PyTypeObject noddy_NoddyType = {
PyObject_HEAD_INIT(NULL)
PyVarObject_HEAD_INIT(NULL, 0)
"noddy.Noddy", /* tp_name */
sizeof(noddy_NoddyObject), /* tp_basicsize */
0, /* tp_itemsize */

View File

@ -123,7 +123,7 @@ static PyMethodDef Noddy_methods[] = {
};
static PyTypeObject NoddyType = {
PyObject_HEAD_INIT(NULL)
PyVarObject_HEAD_INIT(NULL, 0)
"noddy.Noddy", /* tp_name */
sizeof(Noddy), /* tp_basicsize */
0, /* tp_itemsize */

View File

@ -176,7 +176,7 @@ static PyMethodDef Noddy_methods[] = {
};
static PyTypeObject NoddyType = {
PyObject_HEAD_INIT(NULL)
PyVarObject_HEAD_INIT(NULL, 0)
"noddy.Noddy", /* tp_name */
sizeof(Noddy), /* tp_basicsize */
0, /* tp_itemsize */

View File

@ -157,7 +157,7 @@ static PyMethodDef Noddy_methods[] = {
};
static PyTypeObject NoddyType = {
PyObject_HEAD_INIT(NULL)
PyVarObject_HEAD_INIT(NULL, 0)
"noddy.Noddy", /* tp_name */
sizeof(Noddy), /* tp_basicsize */
0, /* tp_itemsize */