Get rid of compiler warning

This commit is contained in:
Neal Norwitz 2006-08-13 18:41:15 +00:00
parent 93bf902242
commit 5ed4997e1f
1 changed files with 2 additions and 2 deletions

View File

@ -1130,9 +1130,9 @@ static void
setint(PyObject *d, const char *name, long value)
{
PyObject *o = PyInt_FromLong(value);
if (o)
if (PyDict_SetItemString(d, name, o) == 0)
if (o && PyDict_SetItemString(d, name, o) == 0) {
Py_DECREF(o);
}
}
PyMODINIT_FUNC