summaryrefslogtreecommitdiff
path: root/Modules/cmathmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-02-14 22:59:58 +0000
committerGuido van Rossum <guido@python.org>1997-02-14 22:59:58 +0000
commit52fa3a69090ac098b01b28f397d9bd08f957e8cd (patch)
treec01e3347c776bd8f5deb93af7e90cfca37dea8eb /Modules/cmathmodule.c
parent0ae748d3c409fc4b870baadd601a53c6a43ddf11 (diff)
downloadcpython-git-52fa3a69090ac098b01b28f397d9bd08f957e8cd.tar.gz
Changes for Lee Busby's SIGFPE patch set.
Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
Diffstat (limited to 'Modules/cmathmodule.c')
-rw-r--r--Modules/cmathmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 7e9de1fd5b..438f010c57 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -247,7 +247,9 @@ math_1(args, func)
if (!PyArg_ParseTuple(args, "D", &x))
return NULL;
errno = 0;
+ PyFPE_START_PROTECT("complex function", return 0)
x = (*func)(x);
+ PyFPE_END_PROTECT
CHECK(x.real);
CHECK(x.imag);
if (errno != 0)