Commit e2061dc4 authored by Thomas Heller's avatar Thomas Heller

Fix bug found by Coverty.

parent cce2267c
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment