summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-03-14 04:32:50 (GMT)
committerGuido van Rossum <guido@python.org>1997-03-14 04:32:50 (GMT)
commit45b83915f8d5974045d374c981531d9b98570df1 (patch)
treef7212bc9be87ae8c5464633e0701cbf9a2f15b15 /Modules
parent1aeb1047baa41af14e720f74f30d288417f1122e (diff)
downloadcpython-45b83915f8d5974045d374c981531d9b98570df1.zip
cpython-45b83915f8d5974045d374c981531d9b98570df1.tar.gz
cpython-45b83915f8d5974045d374c981531d9b98570df1.tar.bz2
New form of PyFPE_END_PROTECT macro.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c2
-rw-r--r--Modules/cmathmodule.c2
-rw-r--r--Modules/fpetestmodule.c12
-rw-r--r--Modules/imgfile.c2
-rw-r--r--Modules/mathmodule.c6
-rw-r--r--Modules/mpzmodule.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 33d5392..049b292 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -730,7 +730,7 @@ Tkapp_ExprDouble (self, args)
return NULL;
PyFPE_START_PROTECT("Tkapp_ExprDouble", return 0)
retval = Tcl_ExprDouble (Tkapp_Interp (self), s, &v);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(retval)
if (retval == TCL_ERROR)
return Tkinter_Error(self);
return Py_BuildValue("d", v);
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 438f010..4e08722 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -249,7 +249,7 @@ math_1(args, func)
errno = 0;
PyFPE_START_PROTECT("complex function", return 0)
x = (*func)(x);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(x)
CHECK(x.real);
CHECK(x.imag);
if (errno != 0)
diff --git a/Modules/fpetestmodule.c b/Modules/fpetestmodule.c
index 475bd7e..b568b60 100644
--- a/Modules/fpetestmodule.c
+++ b/Modules/fpetestmodule.c
@@ -120,11 +120,11 @@ static double nest1(int i, double x)
/* This (following) message is never seen. */
PyFPE_START_PROTECT("Division by zero, inner zone", return 3.1416)
a = 1./(1. - x);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
}else if(i == 2){
a = 1./(2. - x);
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
return a;
}
@@ -140,7 +140,7 @@ static double nest2(int i, double x)
}else if(i == 2){
a = 1./(2. - x);
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
return a;
}
@@ -150,7 +150,7 @@ static double nest3(double x)
/* This (following) message is never seen. */
PyFPE_START_PROTECT("Division by zero, nest3 error", return 3.1416)
result = 1./(1. - x);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(result)
return result;
}
@@ -159,7 +159,7 @@ static double db0(double x)
double a;
PyFPE_START_PROTECT("Division by zero", return 3.1416)
a = 1./x;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
return a;
}
@@ -168,7 +168,7 @@ static double overflow(double b)
double a;
PyFPE_START_PROTECT("Overflow", return 3.1416)
a = b*b;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
return a;
}
diff --git a/Modules/imgfile.c b/Modules/imgfile.c
index 779169d..865ecab 100644
--- a/Modules/imgfile.c
+++ b/Modules/imgfile.c
@@ -390,7 +390,7 @@ PyObject *args;
PyFPE_START_PROTECT("readscaled", return 0)
xfac = (float)xsize/(float)xwtd;
yfac = (float)ysize/(float)ywtd;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(yfac)
cdatap = PyString_AsString(rv);
idatap = (long *)cdatap;
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index bb4f1e8..0df3843 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -82,7 +82,7 @@ math_1(args, func)
errno = 0;
PyFPE_START_PROTECT("in math_1", return 0)
x = (*func)(x);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(x)
CHECK(x);
if (errno != 0)
return math_error();
@@ -101,7 +101,7 @@ math_2(args, func)
errno = 0;
PyFPE_START_PROTECT("in math_2", return 0)
x = (*func)(x, y);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(x)
CHECK(x);
if (errno != 0)
return math_error();
@@ -179,7 +179,7 @@ math_ldexp(self, args)
errno = 0;
PyFPE_START_PROTECT("ldexp", return 0)
x = ldexp(x, (int)y);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(x)
CHECK(x);
if (errno != 0)
return math_error();
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index bf83109..a2bcfed 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -1497,7 +1497,7 @@ mpz_float(self)
mulstate *= multiplier;
mpz_div_2exp(&mpzscratch, &mpzscratch, BITS_PER_MP_LIMB);
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(mulstate)
assert(mpz_cmp_ui(&mpzscratch, (unsigned long int)0) == 0);
mpz_clear(&mpzscratch);