Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *.
diff --git a/Doc/ext/noddy2.c b/Doc/ext/noddy2.c
index fcce2ab..03fe288 100644
--- a/Doc/ext/noddy2.c
+++ b/Doc/ext/noddy2.c
@@ -43,7 +43,7 @@
return (PyObject *)self;
}
-static PyObject *
+static int
Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
{
PyObject *first=NULL, *last=NULL;
@@ -53,7 +53,7 @@
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|OOi", kwlist,
&first, &last,
&self->number))
- return NULL;
+ return -1;
if (first) {
Py_XDECREF(self->first);
@@ -67,8 +67,7 @@
self->last = last;
}
- Py_INCREF(Py_None);
- return Py_None;
+ return 0;
}