summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/mathmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index a241c60..d01de90 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -196,13 +196,13 @@ math_ldexp(self, args)
PyObject *self;
PyObject *args;
{
- double x, y;
- /* Cheat -- allow float as second argument */
- if (! PyArg_Parse(args, "(dd)", &x, &y))
+ double x;
+ int exp;
+ if (! PyArg_Parse(args, "(di)", &x, &exp))
return NULL;
errno = 0;
PyFPE_START_PROTECT("ldexp", return 0)
- x = ldexp(x, (int)y);
+ x = ldexp(x, exp);
PyFPE_END_PROTECT(x)
CHECK(x);
if (errno != 0)