openbsd-ports/lang/python/2.7/patches/patch-Modules_mathmodule_c
2011-07-06 12:05:56 +00:00

13 lines
483 B
Plaintext

$OpenBSD: patch-Modules_mathmodule_c,v 1.2 2011/07/06 12:05:56 jasper Exp $
--- Modules/mathmodule.c.orig Fri Jun 25 22:19:48 2010
+++ Modules/mathmodule.c Wed Jul 6 14:05:41 2011
@@ -696,7 +696,7 @@ math_1(PyObject *arg, double (*func) (double), int can
else
errno = 0;
}
- else if (Py_IS_INFINITY(r)) {
+ else if (errno != EDOM && Py_IS_INFINITY(r)) {
if (Py_IS_FINITE(x))
errno = can_overflow ? ERANGE : EDOM;
else