Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),

PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
This commit is contained in:
Serhiy Storchaka 2015-05-30 17:45:22 +03:00
parent 50451eb912
commit fa494fd883
10 changed files with 83 additions and 36 deletions

View file

@ -1087,8 +1087,8 @@ faulthandler_env_options(void)
has_key = PyDict_Contains(xoptions, key);
Py_DECREF(key);
if (!has_key)
return 0;
if (has_key <= 0)
return has_key;
}
module = PyImport_ImportModule("faulthandler");