Fix bug found by Coverty.

This commit is contained in:
Thomas Heller 2006-03-20 08:28:19 +00:00
parent cce2267cf1
commit e2061dc48e

View file

@ -2512,7 +2512,7 @@ _get_name(PyObject *obj, char **pname)
#endif
if (PyString_Check(obj) || PyUnicode_Check(obj)) {
*pname = PyString_AsString(obj);
return pname ? 1 : 0;
return *pname ? 1 : 0;
}
PyErr_SetString(PyExc_TypeError,
"function name must be string or integer");