summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 01ed36b..67354a7 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -1188,7 +1188,7 @@ math_ldexp(PyObject *self, PyObject *args)
if (! PyArg_ParseTuple(args, "dO:ldexp", &x, &oexp))
return NULL;
- if (PyLong_Check(oexp) || PyInt_Check(oexp)) {
+ if (_PyAnyInt_Check(oexp)) {
/* on overflow, replace exponent with either LONG_MAX
or LONG_MIN, depending on the sign. */
exp = PyLong_AsLongAndOverflow(oexp, &overflow);