[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)

This commit is contained in:
Serhiy Storchaka
2018-07-31 09:09:36 +03:00
committed by GitHub
parent dc9039da23
commit 48c8bf21f9
36 changed files with 75 additions and 81 deletions

View File

@@ -1136,7 +1136,7 @@ handle_system_exit(void)
/* If we failed to dig out the 'code' attribute,
just let the else clause below print the error. */
}
if (PyInt_Check(value) || PyLong_Check(value))
if (_PyAnyInt_Check(value))
exitcode = (int)PyInt_AsLong(value);
else {
PyObject *sys_stderr = PySys_GetObject("stderr");