From 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 31 Jul 2018 09:09:36 +0300 Subject: [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479) --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index c33b6c00ef..5707c9f524 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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"); -- cgit v1.2.1