summaryrefslogtreecommitdiffstats
path: root/Doc/ext/noddy3.c
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/ext/noddy3.c')
-rw-r--r--Doc/ext/noddy3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/ext/noddy3.c b/Doc/ext/noddy3.c
index 08ac31e..9984a3d 100644
--- a/Doc/ext/noddy3.c
+++ b/Doc/ext/noddy3.c
@@ -43,7 +43,7 @@ Noddy_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *)self;
}
-static PyObject *
+static int
Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
{
PyObject *first=NULL, *last=NULL;
@@ -53,7 +53,7 @@ Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|OOi", kwlist,
&first, &last,
&self->number))
- return NULL;
+ return -1;
if (first) {
Py_DECREF(self->first);
@@ -67,8 +67,7 @@ Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
self->last = last;
}
- Py_INCREF(Py_None);
- return Py_None;
+ return 0;
}
static PyMemberDef Noddy_members[] = {