From 513352961411e48a0214fe3119f1b951ec2f5216 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 5 May 2009 07:55:26 +0000 Subject: [PATCH] #5938: use PyVarObject_HEAD_INIT instead of PyObject_HEAD_INIT in noddy examples. --- Doc/includes/noddy.c | 2 +- Doc/includes/noddy2.c | 2 +- Doc/includes/noddy3.c | 2 +- Doc/includes/noddy4.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/includes/noddy.c b/Doc/includes/noddy.c index 3f37434e305..8f79fcf6bf4 100644 --- a/Doc/includes/noddy.c +++ b/Doc/includes/noddy.c @@ -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 */ diff --git a/Doc/includes/noddy2.c b/Doc/includes/noddy2.c index 0907281baa7..9b8eafb5604 100644 --- a/Doc/includes/noddy2.c +++ b/Doc/includes/noddy2.c @@ -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 */ diff --git a/Doc/includes/noddy3.c b/Doc/includes/noddy3.c index fac44d88086..89f3a7712e3 100644 --- a/Doc/includes/noddy3.c +++ b/Doc/includes/noddy3.c @@ -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 */ diff --git a/Doc/includes/noddy4.c b/Doc/includes/noddy4.c index 1b3704ceff8..6a96fac5e1c 100644 --- a/Doc/includes/noddy4.c +++ b/Doc/includes/noddy4.c @@ -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 */