incref the Py_None before returning it

This commit is contained in:
Dana Jansens 2002-12-21 12:19:29 +00:00
parent 2efea6f21c
commit 925048fedf

View file

@ -19,6 +19,7 @@ static PyObject *shit(PyObject *self, PyObject *args)
printf("SHIT CALLED!@!\n"); printf("SHIT CALLED!@!\n");
Py_INCREF(Py_None);
return Py_None; return Py_None;
} }
@ -36,7 +37,7 @@ static PyMethodDef OBMethods[] = {
void initopenbox() void initopenbox()
{ {
PyClient_Type.ob_type = &PyType_Type; OBClient_Type.ob_type = &PyType_Type;
Py_InitModule("openbox", OBMethods); Py_InitModule("openbox", OBMethods);
} }