mirror of https://github.com/python/cpython.git
#5938: use PyVarObject_HEAD_INIT instead of PyObject_HEAD_INIT in noddy examples.
This commit is contained in:
parent
42c66d4f47
commit
5133529614
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue