function, not a PyObject *.
return (PyObject *)self;
}
-static PyObject *
+static int
Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
{
PyObject *first=NULL, *last=NULL;
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|OOi", kwlist,
&first, &last,
&self->number))
- return NULL;
+ return -1;
if (first) {
Py_XDECREF(self->first);
self->last = last;
}
- Py_INCREF(Py_None);
- return Py_None;
+ return 0;
}
return (PyObject *)self;
}
-static PyObject *
+static int
Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
{
PyObject *first=NULL, *last=NULL;
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|OOi", kwlist,
&first, &last,
&self->number))
- return NULL;
+ return -1;
if (first) {
Py_DECREF(self->first);
self->last = last;
}
- Py_INCREF(Py_None);
- return Py_None;
+ return 0;
}
static PyMemberDef Noddy_members[] = {