New form of PyFPE_END_PROTECT macro.
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 @@
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 @@
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 @@
/* 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 @@
}else if(i == 2){
a = 1./(2. - x);
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(a)
return a;
}
@@ -150,7 +150,7 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);